MArcomage

Free multiplayer on-line fantasy card game

Please log in

Mojko on 09:37, 3. Jan, 2011
AI is limited only to things that are accessible via game attributes. But still, I created the AI to apply strategy that I would apply (considering the limitations). So, it's basically a computer clone of myself playing against you ;-) Looking at the replays, the AI performance is slightly above my expectations, but don't worry, I'll be analyzing the replay data and will be improving the AI.
Mojko on 16:50, 3. Jan, 2011
Based on multiple replays, it seems that AI does not value it's facilities as much as it should. Many times he played Overseer in a situation when wall gain was not really needed and it wasn't really worth losing 1 Quarry. That's why I'm shifting behaviour on facilities from 1 - 2 / 3 / 4 or more to 1 - 3 / 4 / 5 or more.

Also, I'm adding adjustment factor for resources (unlike other game attributes they lacked the dynamic factor). Dynamic factor is set to 0 - 6 / 7 or more, so the AI will value resources a bit more if he is in shortage.

Changes applied in r1326.
Mojko on 18:26, 3. Jan, 2011
Just got another interesting idea - we could use the AI to be a guide for beginners in games. I could add button "help me", which would choose which card (and mode) to play and would inform the player about that choice. It would be up to the user to take the advice.

I think this could be useful for beginners, but should be probably available only in Friendly games.
DPsycho on 19:06, 3. Jan, 2011
Does the AI look at cards in our hands and attempt to prevent the play of cards by discard or resource reduction if they would otherwise end the match? I don't recall seeing it draw a targeted discard, but I've only played it twice so far.
Mojko on 19:13, 3. Jan, 2011
This is a part of AI code:

// evaluate victory and loss conditions (avoid draws)
if ($victory and !$loss) $points = 99999; // choose this choice in case of certain win
elseif (!$victory and $loss) $points = 0; // never choose this choice in case of certain loss

As you can see, I programmed it to avoid draws.

Sadly, the AI does not understand cards at all, so actions like discarding cards from opponent's hand are beyond his understanding. It's also not possible for AI to plan ahead because it's based on a greedy algorithm.

Btw if you want to see overall AI win ratio, go to statistics section and click on "other statistics".
dindon on 06:30, 4. Jan, 2011
Mojko wrote:
Why would you want to chat with an AI? o_O

Currently he wouldn't be responding in any way. It would be possible to make a text parser like POD bots in CS had, but I don't think it's necessary.

I don't know, I just feel kind of rude leaving a game with him without saying gg :/
Mojko on 09:47, 4. Jan, 2011
Don't worry, the AI doesn't bear grudges ;-)
Vauceene on 18:28, 4. Jan, 2011
The computer did not use Sheath your swords to replace all the cards on my hand, instead playing Treacherous Artifact. I won on my turn.

It uses Goblin Saboteur during turns in which the secondary effect will not trigger, even if I have other cards on my hand that would.
Mojko on 18:53, 4. Jan, 2011
That's understandable. The AI doesn't understand the discarding mechanic and it's not capable of planing ahead.
DPsycho on 18:53, 4. Jan, 2011
DPsycho wrote:
I don't recall seeing it draw a targeted discard

I've actually seen it draw Intrigue now. It could have used it to save itself, but as Mojko suggested, I was able to trust that it could not see my cards and thus wouldn't upset my plan.

What I want to know is, if the AI isn't written to make use of targeted discards, why is Intrigue in its deck?
Mojko on 19:01, 4. Jan, 2011
Because AI uses starter decks as default. If anyone want, he can suggest new starter decks. Those that we use now are years old.
Mojko on 13:16, 5. Jan, 2011
AI now understands basic discard and summoning actions. BEWARE! :D

Implemented in r1352.
Mojko on 16:58, 5. Jan, 2011
Please report any games where AI uses discard or summoning cards. Thanks.
DPsycho on 00:20, 6. Jan, 2011
Replay
AI used Intrigue intelligently.
Mojko on 08:39, 6. Jan, 2011
Thanks, both replays helped me analyze AI behavior ;-)
Mojko on 19:35, 7. Jan, 2011
In case of someone's interest I'm adding links to current AI's decks:

Deck 1
Deck 2
Deck 3
Mojko on 09:37, 9. Jan, 2011
After some more analysis, I think we could improve the AI by giving it better decks to play with. Currently it uses starter decks by default and if player chooses he can give the AI his own deck.

We could add another option to the list "advanced deck". The default would still be started decks, but for players that would like a more difficult challenge, it could be interesting.

Please feel free to suggest any decks that you think would be good for the AI. Note that AI has limitations (doesn't really plan ahead), however it can trigger and use token effects (I wouldn't give it a Titan deck however).
Quincunx on 09:39, 9. Jan, 2011
I think the AI would use a simple rush deck very effectively.
DPsycho on 15:21, 9. Jan, 2011
With a Beast deck, would it know to save Uncommon and better cards until it will be triggering the token effect, or would it just play whatever gives the most damage at every turn?