Newsgroups: comp.ai.games
Path: cantaloupe.srv.cs.cmu.edu!europa.chnt.gtegsc.com!news.sprintlink.net!simtel!harbinger.cc.monash.edu.au!bunyip.cc.uq.oz.au!munnari.oz.au!cs.mu.OZ.AU!mundil.cs.mu.OZ.AU!trd
From: trd@mundil.cs.mu.OZ.AU (Tyson Richard DOWD)
Subject: Re: AI for Magic
Message-ID: <9516916.21744@mulga.cs.mu.OZ.AU>
Sender: news@cs.mu.OZ.AU (CS-Usenet)
Organization: Computer Science, University of Melbourne, Australia
References: <3prr6p$1q5@gap.cco.caltech.edu>,<D92nEI.ID7@news.hawaii.edu> <1995Jun1.231519.11607@roper.uwyo.edu>
Date: Sun, 18 Jun 1995 06:12:25 GMT
Lines: 67

ghost@UWYO.EDU (information junkie) writes:

>In article <D92nEI.ID7@news.hawaii.edu>, wtanaka@Hawaii.Edu (Wesley Tanaka) writes:
>>Corinna Esmeralda Schultz (ces@wrath.ugcs.caltech.edu) wrote:
>>: AI, I want to write AI for this game.  The problem is, it doesn't
>>: really fit into the types of games that are talked about on this group,
>>: so I'm not sure where to start with this project.
>>
>>Is this for a school project, or just for fun?  If you're trying to make 
>>it a good player, I don't know that a neural net could be trained that 
>>well.  I would think that you would need to incorporate aspects of how 
>>you play (or whoever plays that made you interested in the game).  But if 
>>this is an assignment, I would think that having the computer do more of 
>>the thinking work would be more interesting.  I was thinking about doing 
>>something like this, but was wondering if there would be any copyright 
>>infringements.  Also, how would you implement something like the Chaos 
>>Orb (to give one example).  Anyway, just my .02

This is not an easy task - recently our AI class had to write players
for a reasonably simple card game (Oh Hell - like a simplfied form of
500). The biggest hurdle you run across is that there are a lot of
possibilities of play, and you never have much information to go on.
Many of the successful players seemed to use simulation or probability
models to decide the best card to play in any situation.

Just the rules for Magic (assuming you can agree on them) are complicated,
so developing an AI that does even a reasonable job will be hard. You 
will certainly find trouble using the inventive card combinations that
humans come up with quite often, so although it might be an OK player
to play your first few games with, after a while you'll find it only
wins when you get some bad luck.

>I've been thinking about this some.  I think it might be possible
>with a rule based system.
>Something like
>Shivan Dragon :== !firebreathing
>Black Knight :== !black ward & ! white ward ! .....

>It would take a lot of rules. Each card could have upwards of 15-20 
>rules saying what it could and could not be used with.
>This would also allow new rules to be added. If your clever enough
>(i've not been that clever yet) you could even come up with rules
>for combos of cards.
>Dwarven Warriors & !Marsh Viper :== <stratigy 1>
>Dwarven Warriors & Marsh Viper :== <Stratigy 2>
>This would allow you to keep a set of rules with each card. Then,
>for each deck, you could simply take all of the rules for each
>card and concatenate them all together.
>I'm not sure if this will work.

I'm not sure whether you use these rules to describe the rules for Magic,
or some sort of strategy for play, but the problem is after eliminating
all the illegal plays, there are a _lot_ of legal plays left (tap artifact
now, or later?, attack or leave to defend? which land to play? summon
now? what unit to sacrifice to the big evil guy? try to cancel their spell,
or take the damage?). These can all be described by heuristics, but its
hard to make it so that the game doesn't become stale. (oh not again,
it _always_ puts firebreathing on the goblins. Yawn). 

Possibly this would be better suited to a Genetic Algorithm approach, or
a Neural Net (not that its likely that one that good NN could be developed -
the complexity of Magic is seems similar to Bridge or Chess - not Tic-Tac-Toe,
or Connect-4).

It's an interesting project though...

Tyson.
