Casting a spell that does nothing

All about getting the AI less baka...
Post Reply
night_day
Posts: 10
Joined: Wed Jan 05, 2011 7:52 pm

Casting a spell that does nothing

Post by night_day »

I'm new to the Wagic scene, so please let me know if this has already been discussed before or if it's too narrow to be talked about here.

I was playing a game agains Elfballl today and the AI casted Elvish Promenade without there being any elves in play. I'm wondering if this occurs with other spells that might produce X things (tokens, damage, etc) based on the battlefield state and whether or not the AI can be improved so that it wouldn't cast it when it's net effect would be nothing. I'm assuming this would require categorizing cards to be able to easily code this, so might not be as easy as I described, just seemed pretty silly of the AI in that situation.
Yorien
Posts: 33
Joined: Tue Feb 02, 2010 10:59 pm

Re: Casting a spell that does nothing

Post by Yorien »

Yorien says:

Probably the main problem here is that Wagic only has a "generic" IA. Planeswalkers for example, has an IA programed to play the DECK it's controlling. Planeswalkers IA knows the basic rules of magic and has a specific idea of how it should play the deck it's controlling.

Wagic on the other side knows "only" the basic rules. There's no IA programmed on how it should play the cards and how to "make the combos" to get the most of the deck it's currently controlling.

Why? Probably because many, many cards in wagic must be hardcoded. I.E. Instead of a generic rule usable by a lot of cards (like first strike, flying...) Elvish Promenade has it's "own", specific rule. while Wagic's IA "knows" the rule, doesn't "understand" how to use it correctly.

Planeswalker's IA is way better because it's a deck based game while wagic is a set based game. Just look at the ammount of different cards playable on both games... while planeswalkers IA only plays decks already created with minor changes (base deck + it's sideboard), you can create as many different decks in wagic as you want. As long as no "specific" IA for the created deck is included in Wagic, only the "generic" Wagic's IA will handle the deck, that's why it sometimes Wagic seems to play dumb.

The "generic" IA can be improved, though, to play "less dumb", but you can't expect to code a specific rule in the base IA for each card available... that should be somehow coded in the deck proper like an instruction booklet for that deck.
Zethfox
Posts: 3029
Joined: Thu Jun 10, 2010 11:28 pm

Re: Casting a spell that does nothing

Post by Zethfox »

yor is absolutely correct, there is no code in the source yet to tell ai when it shouldnt or should do a spell. however there is a system for it to know what abilities (activated abilities) a card has, and ive been improving this slowly.
the Ai can only know if a spell is good or bad...and it builds its targets around it....

we are currently talking about making ai "personalities" which can include insructions on what that ai should do with certain cards, basically planeswalkers ai type, where it is preprogramed to know exactly when it is the right time to play the card.
Post Reply