Advertisement

Computer Ported CCG AI

Started by May 10, 2003 06:11 PM
0 comments, last by Immersion 21 years, 4 months ago
Okay, I work downstairs from a graphic designer who is currently producing his first comic for Image Comics. He is concurrently developing a CCG that ties in with the comic, and is somewhat along the lines of the DBZ CCG in rules. I''m just after a few suggestions on which path you''d recommend to take, or even that you know has been used for similar computer game CCGs (even though I can only think of Magic: The Gathering) that would allow me to implement a decent computer opponent. One of my first issues is deck construction, although I think I will give the computer a standard starter deck to begin with, before I worry about letting it generate its own. So, if I keep a standard deck for now, is it a case of building a set of opening moves, similar to chess, or do I evaluate each card on the fly? Also, should I keep the computer *locked* away from the contents of the deck, or leave it access to what cards are contained. A very good human player often memorises a good portion of his deck (depending on its size), so perhaps that option could be relative to difficulty level? I expect it will come down to pure math in the end, and a table of counters - as in, which card types work best against others, and so on. And lastly, and ideally, I''d love to implement a learning capacity into the computer, noting the most effective opening moves and deck constructions, but that''s for another topic I''m no stranger to AI, and am more than competent with C++, so don''t be afraid of using big words or pseudo-code "If electricity comes from electrons, does morality come from morons?"
"If electricity comes from electrons, does morality come from morons?"
Having played a lot of CCGs at a high competitive level, I can tell you that good players know their decks inside out. That is, they can recite every card in the deck, the exact text on the card and all of the rules that relate to that card and the interactions with all other cards in the deck. This is how they win repeatedly. Your computer agent should do no less.

In other words, your agent should have access to a database that contains information about each card, along with a deliberative function that can deduce the outcome of the interaction of any two cards presented to it. Ideally, you''d like to expand this to handling triplets and multiples of cards, for this this is where interesting combo''s come from.

You then need a method for evaluating which card to play out of the hand next. Take MTG for example: early priority should be given to establishing mana stability. In a fast creature deck, you want to play mana and a creature on your first turn. In a counter deck though, you''d only play the mana and keep it untapped to thwart your opponents oppening.

How you open may also depend on whether you play first or second.

Give some thought to this. Sit down and write out an ideal play guide for a given deck. Then try and reduce this to a set of rules or guidelines that can be followed to play the deck. If you give these to a human player, they should be able to read them and then play the deck to its optimum ability, just by following the rules/guidelines.

Then code these rules into your agents knowledge base. Whether you use scripting, a finite state machine, a planner, an artificial neural net or something else, your agent should be able to choose the appropriate action when presented with the current game state, in accordance with the aims of the deck (the way the deck is designed to obtain a win).

I hope this post helps... if you have any questions about it, just holler.

Cheers,

Timkin

This topic is closed to new replies.

Advertisement