It's Magic

Started by
3 comments, last by MichaelCarr 20 years, 8 months ago
Hi, I''ve recently dusted off and been playing my old copy of Magic The Gathering by Microprose. I was just wondering if anyone here has any thoughts or knowledge about how the A.I. for this game works? I suspect given the scope of the game that a great deal of the logic and A.I. must exist inside scripts? Michael
Advertisement
I remember that game, at time the ai''s approach seemed to just do completely random things... like putting boosts on it''s oppent''s creatures when there was no decent reason at all to do so. I think it was primarily driven by determining the ''possible'' actions, i.e. stuff that it had mana and cards for, and then used some kind of benefit-weighting heuristic to determine which of the possible actions (if any) to perform. It did do a pretty good job of matching defenders to attackers and deciding when to attack, but i guess those can be put into rather simple rules as well. The most complex part was probably determining which actions would be allowed by the game rules, but since such a system is needed to restrict the actions of the player as well it is not really part of the AI i guess.

Marijn
I would guess that the rules are encoded into the card logic themselves rather than having a large central rule-based system. There are so many different options available for the specific rules that cards have that a central repository for the AI to wade through would be cumbersome. Then, I would believe that it would be a game-tree type of approach in looking at the cards in your hand, the cards on the table and the opponents cards.

Deciding what card in your hand to play out would be be easier since it is a supply/demand/power equation. Do you need more mana cards? If so, play one of the type you are low on. Else, play a creature or spell that best augments what you have out there already.

Deciding to attack and exactly how to do it would be a little more complex - but only because of the rules surrounding certain cards that would necessitate things being done in a certain order.

My future-step-daughter has an introductory level Magic game on the computer that she spanks continuously... but I think that is by design. It was not meant to be all that huge and powerfull... and it has a very limited set of cards from which to work. Because of that, I really can''t get a feel for whether or not the AI is good.

Dave Mark - President and Lead Designer
Intrinsic Algorithm - "Reducing the world to mathematical equations!"

Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
Author of the book, Behavioral Mathematics for Game AI
Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play

"Reducing the world to mathematical equations!"

as a magic player my self i would gander that the AI is really bad if a real magic player is playing vs the AI, though ive never played teh game you''re speaking of, i played the RT MTG game for the playstation. it lost real fast because i know how to play the game better(IE what cards are good compared to what are bad)
I suspect the only way I''m going to learn more about this will be for me to sit down with some paper and think it through.

Off the top of my head I suspect that there are a number of levels to it''s analysis;

Immediate threats and ability to counter those threats.

Long term planning ( card combinations, deck themes ).

Short term goals ( I can currently attack without openning myself up to danger).


The biggest problem as I see it is that there are so many different cards with different abilities some how if each card could be converted into a threat and usefullness value for each player then there is a chance that it could at least weight the relative benifits of the different cards in relation to each other.

I think the actual behaviour/effects of each card are encoded into a card script, but I suspect that these would be functional scripts rather than useful for card analysis.

Just my current thoughts.

When other idea''s occour to me i''ll post.

Michael





This topic is closed to new replies.

Advertisement