Arcomage - AI

The role-playing games (I-X) that started it all and the various spin-offs (including Dark Messiah).
User avatar
GreatEmerald
CH Staff
CH Staff
Posts: 3330
Joined: 24 Jul 2009
Location: Netherlands

Unread postby GreatEmerald » 01 Apr 2015, 20:08

Well, the base evaulation was just based on my own strategy. I tend to treat tower as twice as important as wall, for instance, and it works out fairly well.

There are some issues with non-direct cards, yea. The wall swap is only evaluated for the current turn, so they might use it to boost their wall by 3 and reduce mine by 3, which is not very effective. And the discard cards just have a set priority of around 0.05, as in something that you wouldn't discard, but only use if you have really poor cards. It works as it is like that, but could be handled better.

As for whether Arcomage is a game with partial or complete information depends on whether in the config you choose to reveal enemy cards or not. Though admittedly the current AI does not account for that (which I don't mind much, because I don't like playing with cards revealed).

There is a game-ending mechanism for one card. If the card effect will result in a victory, the AI evaluation functions will add 1.0 to the priority of the card, which means the AI is guaranteed to play that card, even if all it does is deal 1 damage or so (since all other, non-winning priorities are capped at 0.95).

And yes, there are some general preference rules, but they're evaluated at the very end in D code: https://github.com/GreatEmerald/libarco ... rds.d#L713
This makes it so that if the AI is close to winning and doesn't have any interesting cards, they'll more likely discard them. And the rest of the priorities are in CardPools.lua: if the AI has very low or high tower, they consider strong tower-building cards worth 2% more than usual etc.

One thing the AI does not consider, unfortunately, is the card cost. If the card effect is strong and they can afford it, they use it, even if it's actually not worth it from the cost/benefit perspective. Something could be done to consider the cost, but I'm not too sure what, since it would add further incentive to discard cards over playing them. Hm.

Almer
Leprechaun
Leprechaun
Posts: 3
Joined: 26 Mar 2015

Unread postby Almer » 02 Apr 2015, 10:25

Well now i fairly know how does your AI works..are you interrested in some cooperation on improveing it (i am interrested only in non-revealed option, since revealed is quite straightforward to compute)?

What i am thinking is generating game tree (what i can reach is 3-4 AI moves which means 5-7 moves) considering possible cards that opponent can play/have with some modificators (like adding +1 mine when u have 3 is much more efficient than when u have 10) and game strategies (like dmg, defence, tower build, disabling opponent...).

Obviously not all at once...

User avatar
GreatEmerald
CH Staff
CH Staff
Posts: 3330
Joined: 24 Jul 2009
Location: Netherlands

Unread postby GreatEmerald » 02 Apr 2015, 11:47

Sure, that would be really nice.


Return to “Might and Magic”

Who is online

Users browsing this forum: No registered users and 40 guests