Charas-Project

  • Home
  • Help
  • Search
  • Calendar
  • Login
  • Register
*
Please login or register.

Login with username, password and session length
 

News:

Click here to join us on IRC (#charas on irc.freenode.net)!



  • Charas-Project »
  • Game Creation »
  • Requests »
  • RPG Maker Programming »
  • RPG Maker 2003 AI Card Game Help
« previous next »
  • Print
Pages: [1]

Author Topic: RPG Maker 2003 AI Card Game Help  (Read 7748 times)

Offline Thiamor

  • Initiate
  • *
  • Posts: 74
RPG Maker 2003 AI Card Game Help
« on: January 11, 2011, 03:44:32 AM »
Anyone know of any way whatsoever, to make a simple AI in RPG Maker 2003? I wanted to add 'card games' into my game, and you click the Cards you see on the ground and play the game. I know images will need to be uploaded, but I need some help.
Logged

Offline drenrin2120

  • Global Moderator
  • Sage
  • *
  • Posts: 6,101
Re: RPG Maker 2003 AI Card Game Help
« Reply #1 on: January 11, 2011, 06:15:06 AM »
AI, jeez... That seems pretty tough, nevermind in rm2k3. The only thing I can think of is a ton of conditional branches. :/

You'd have to plan out exactly how the AI will react to every situation.
Logged

Offline Prpl_Mage

  • Administrator
  • Sage
  • *
  • Posts: 7,645
  • The Administrator Mage
    • Check out our itch website
Re: RPG Maker 2003 AI Card Game Help
« Reply #2 on: January 11, 2011, 03:16:22 PM »
If you want an actual AI - I can't think of any easy way.

You could always do a substitute AI that bases its' choices simply on chance (randomly). But it all depends on the card game your making since their choices must be playable.
Logged
Cool RPGM Project!
Sprite till you die

Oh my god, this was ...10 years ago...

Offline heidy678

  • Initiate
  • *
  • Posts: 1
Re: RPG Maker 2003 AI Card Game Help
« Reply #3 on: April 25, 2011, 07:43:08 AM »
Thanks Prpl_Mage for your advice
Logged
HEIDY

Offline SaiKar

  • KOFFING!
  • Staff
  • Royal
  • *
  • Posts: 4,082
Re: RPG Maker 2003 AI Card Game Help
« Reply #4 on: April 25, 2011, 12:34:59 PM »
Old topic, but interesting.

I programmed a tic-tac-toe game in high school. The AI was controlled as follows, which each number down being decreasing priority.
1) win the game by getting three in a row
2) prevent the player from winning when it sees the player has two in a row.
3) take the middle square, if it's open
4) take any other square chosen randomly

At the beginning of the game, it was mostly getting down to that 4th option since the first three didn't apply, but near the end the others would kick in to help the AI win and try to stop the player from winning. These were all checked using copious amounts if if: then statements. I honestly can't imagine it being too much less ugly in RPGMaker with conditional branches.


I don't know the rules to your game, but I assume the same basic ideas apply. Unless there is a specific strategy that the AI should follow, random movement is a good fallback to prevent the player from being able to predict their moves.
Logged

Offline zuhane

  • Freakalicious
  • Leader
  • *
  • Posts: 2,192
  • Kill me
Re: RPG Maker 2003 AI Card Game Help
« Reply #5 on: April 25, 2011, 07:13:54 PM »
Making a card game would be extremely difficult. However, it's more than possible,
and you'd have a lot of fun stuff to play around with!
Logged
Geese ruined my life.

https://soundcloud.com/tom-kingston-3/geese

Offline DragonBlaze

  • A Wild DB Appeared!
  • Royal
  • *
  • Posts: 3,329
Re: RPG Maker 2003 AI Card Game Help
« Reply #6 on: April 29, 2011, 08:55:33 PM »
RPG maker 2k/3 is probably not a good option to make a card game with. If you programmed it in rmxp or some maker with some custom scripting capabilities you could use a minmax algorithm. What a minmax algorithm does is it starts with the current player, and goes through every move they could possibly make, then for every move that could be made, it calculates every possible move that the other player could do. It does this for several iterations (depending on how fast you want the computer to decide a move). At the end, it applies a simple heuristic function to see which set of moves would be the most beneficial, then the computer selects the first move in the sequence. So if you would like to try scripting, google minmax or alpha beta pruning (same thing, more complicated but more efficient).

If you want to use rm2k/3 or event based coding, you can try creating a neural network. Its really a lot less complicated than the name suggests. I'll attach a picture of what a neural network looks like, and try to explain it. Neural networks were inspired by the way neurons work. Basically instead of having a super complicated event, you would break it down into many smaller (and simpler) events. Each of the first level events will be activated if some condition is met. For example, if its a health or point based card game, one of the triggers could be if the other player has more health of points than you. These events should check for everything that you want the strategy based off of. If the condition is met, have it set a switch, boolean, or whatever they're called in rpg maker to true, else set them equal to false.

Then you'll have second level events that check to see which of the first level events were triggered. Second level events will be triggered by any combination of first level events that you want. Each event will have only one possible output which will be the move to do. It could be lay your most powerful card, or lay a card that will do a certain action, or whatever you would like it. If more than one second level event is triggered (so there are multiple moves possible), choose one at random if possible. Also, always have a failsafe move in case none of the second level events are triggered.


Logged
Hell Yeah! Just recovered all my old rm2k/3 games from my 10 year old, broken laptop hard drive that had been formatted and had a new OS installed on it. Oh, and I did all of this from my phone. WIN

Offline andyb

  • Initiate
  • *
  • Posts: 8
Re: RPG Maker 2003 AI Card Game Help
« Reply #7 on: September 30, 2011, 07:10:27 AM »
nice thanks, good information man. :bend:
Logged
I'm a bot

Offline Moosetroop11

  • Sage
  • *
  • Posts: 7,398
Re: RPG Maker 2003 AI Card Game Help
« Reply #8 on: September 30, 2011, 11:05:37 AM »
Do you keep making different accounts or something?
Logged
Maaaaaaaaaaaaaaaaaaaaaaaaaaan I missed this place.

Quote from: drenrin2120
Maaaaaaaaaaaaaaaaaaan I missed you.

Quote from: fruckert
Maaaaaaaaaaaaaaan I missed that welcome.

  • Print
Pages: [1]
« previous next »
  • Charas-Project »
  • Game Creation »
  • Requests »
  • RPG Maker Programming »
  • RPG Maker 2003 AI Card Game Help
 

  • SMF 2.0.10 | SMF © 2015, Simple Machines
  • XHTML
  • 2O11
  • RSS
  • WAP2
  • Simple Machines Forum