Ai blocking/attacking, wasting damagers

All about getting the AI less baka...
wololo
Site Admin
Posts: 3728
Joined: Wed Oct 15, 2008 12:42 am
Location: Japan

Re: unhappy ai

Post by wololo »

Zethfox wrote:the issue is more that there is no hack method for adding any ai decks to it...
Isn't there? DotP has a fairly active modding community...
Zethfox
Posts: 3029
Joined: Thu Jun 10, 2010 11:28 pm

Re: unhappy ai

Post by Zethfox »

as explained above when you try to run the game with a Ai deck that was hacked in...considering you own a legit copy of DoTP...the game instantly crashes...yes there is...however its not really as impressive as you would think simply by reading the threads.

also i will add those guys are playing with fire...WoTC is going to slap thier faces off if theyre not careful.....
kevlahnota
Posts: 619
Joined: Tue Feb 08, 2011 3:00 pm
Location: Philippines
Contact:

Re: unhappy ai

Post by kevlahnota »

@Zethfox
yup it crashes (I think its due to custom ids of a custom deck), that's why when i've discovered wagic (about a week ago), I'm very amazed with it and like to support this project if i can.
Yorien
Posts: 33
Joined: Tue Feb 02, 2010 10:59 pm

Re: unhappy ai

Post by Yorien »

Yorien says:
Zethfox wrote: ...
and the crowd cheer!!!! ROOOOOAAAAR! thank you yorien....hit the nail on the head again!
short version:

DoTP ai is built to only run 75 card decks amazingly....but thats it....
Wagic ai is built to run decks built from a 7613(exact amount of current svn) decently....not amazing...but decent...
yeah...i can also code exact instructions for a deck to follow in wagic...and have ai decks which use those decks 100% perfect....but why? it already uses the whole collection decently....
...
Now THIS is an idea I'd like to see. You ask why? and I'll tell you the BECAUSE... :)

Because this way, you can code specific behaviors for specific decks, same as Duels, but keeping the generic AI in case there is no specific code written. I remember sugesting this same thing somewhere in my other posts.

We could aply the MtG rule "If a card text violates a generic MtG rule, the card always wins" to wagic's IA: "If there's a specific ruleset written for a deck (or a card inside the deck, or a group of cards...) then give priority to that ruleset. Else follow standard AI"

- - -

Problem we have, There are thousands of decks and thousands of different strategies. While we can give a quick look at a deck and "get the hang of it" just by taking a look at the cards, AI just doesn't "understand" the differences of playing an Elf winnie deck, a Suicide Black or a Living dead combo deck. It'll keep popping the "biggest creature it can cast" as wololo said somewhere in the forums... no matter it's a bad idea or the best move it could do.

So, if we could code some kind of secondary AI (for example, in the deck.txt). AI should highly improve for that deck. Just by giving the AI some ideas like...

- Card priority (Don't pop that 3G trampling */* Elf unless there are at least two other elves down, no matter is the biggest card you can play right now... it currently sucks so play something else)

- Card usage (Titanias are there for their skill - mana gen -, don't think of attacking with them EVER, unless It's an all-out attack or you win with the damage dealt)

- Complex checks (don't ever pop Living Dead unless creatures in your graveyard are better that creatures in opponent's graveyard - and you at least have a pair of nasties in yours, of course -)

- Deck usage (Living Dead deck: Every time you have to discard a non-random card from your library or hand, don't pick it at random... look for the nastiest creature available and select it).

... you can change a decent playing AI to a way better one... at least for one deck.

Also, idea should be to keep the deck coding to a minimum so anyone without programming knowledge could code the deck's AI, and then let the current AI handle that coding. I especially like the idea of using keywords inside the deck.txt next to the cards (or under them in a specific <AI Section>) to handle that, so once the AI chooses a random deck to play and "reads" it's coding, gets and idea on how to play the deck. ¿No coding for a particular hand or cards available? follow generic AI. At least it won't crash like Duels... :twisted:

More complex orders should require an extra bit of coding, but that's another story and it's not a priority. But I believe that even some basic "specific AI" instructions could greatly enhance Wagic's experience.
ittobaal
Posts: 46
Joined: Thu Dec 09, 2010 3:06 pm
Location: Netherlands

Re: unhappy ai

Post by ittobaal »

"Inglorius Basterd From heck" <-- made my day! Thank you.

Minimax can be optimized and can be used side by side with hard coded AI. One does not exclude the other, however minimax is harder to implements then it looks, or at least to me and for now.
The ???secret??? might lie with minimax+alphabeta pruning+ deck specific strategies
muaddib
Posts: 38
Joined: Fri Jun 25, 2010 9:28 am
Location: Russia

Re: unhappy ai

Post by muaddib »

Well it's all very good, but when I blocked A.I.'s creatures, and no more my creatures, and A.I. has lot creatures and it do "Wraith of God".
I shocked, and then I win him through some turns. Sometimes A.I. miss huge advantages.
Zethfox
Posts: 3029
Joined: Thu Jun 10, 2010 11:28 pm

Re: unhappy ai

Post by Zethfox »

ai "personallities" this is exactly what you are talking about...and its currently being discussed by the dev team...
Yorien
Posts: 33
Joined: Tue Feb 02, 2010 10:59 pm

Re: unhappy ai

Post by Yorien »

Yorien says:
ittobaal wrote: Minimax can be optimized and can be used side by side with hard coded AI. One does not exclude the other, however minimax is harder to implements then it looks, or at least to me and for now.
The ???secret??? might lie with minimax+alphabeta pruning+ deck specific strategies
I believe that in most Magic decks, as has already been shown in countles GP's and Sanctioned Tournaments, deck specific strategy is of uttermost importance and has proven to have much more "weight" than MinMaxing. MinMaxing is probably an easier way to get a decent AI working, but specific strategy is the way to get from a decent AI to a pretty good one.

Problem is: specific strategy is... well... specific. It only works for that deck, and minor changes make that strategy worse or unusable. That's why I'd leave MinMaxing for the generic AI, and keep 'specific strategy' to be configured in the deck.txt file (keeping as "generic" as possible, so the same keyword works for as many cards as possible).
Zethfox wrote:ai "personallities" this is exactly what you are talking about...and its currently being discussed by the dev team...
As a base idea is good, but take into account that "personalities" will probably only work for basic creature decks, and not even for all creature decks. It might be easy to build a "Suicidal" personality for a Suicide Black, or a Sligh, but - for example - how do you build a "combo" personality w/o explaining the AI the exact combo it should make (Living Dead, place big nasties in your graveyard first and THEN cast Living Dead)?. Base personalities should might be "suicidal", "aggresive", "neutral", "defensive", but for everything else I believe specific coding is the way to go.

Take note, for specific coding I don't mean to code how the AI should deal with every card... but instead to give "card usage" or "card personality" instead of "deck personality". Instead of coding an "aggresive deck AI", code an "attacker card AI" and use it as a keyword in your attacking cards in the deck###.txt.

It might look like a greater work, but I believe it's way more "powerful" because it'll allow for more complicated strategies. In an Elf deck with Llanowar elves, you won't probably attack with them no matter the AI is coded as aggresive, but instead you'll continually use their skill as mana sources, so instead of coding them inside an "aggresive deck AI", code an "aggresive card AI", and a "use skill card AI", and then place kwywords under your cards so the AI knows that the Llanowars must be used mainly for their skill, and not for attacking.
muaddib
Posts: 38
Joined: Fri Jun 25, 2010 9:28 am
Location: Russia

Re: unhappy ai

Post by muaddib »

A.I. blocked most weak my attackers, and was killed him. Why so that, he must blocked strongest creature.
muaddib
Posts: 38
Joined: Fri Jun 25, 2010 9:28 am
Location: Russia

Re: unhappy ai

Post by muaddib »

These weakness in play A.I. I have noticed:
1) A.I. attack with creature 2/2 and 1/1. I have creature 2/2 and 0/5. He lose creature 1/1.

2) A.I. cast on my creature 4/4 Lighing Bolt although were creatures 2/2 and 1/1. Why?

3) A.I. blocked my creature 4/4 for creature 2/2 although was creature 1/1. Why?
Locked