Post Reply 
 
Thread Rating:
  • 3 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Why an AI for Outwitters is hard to do
04-12-2012, 05:12 AM (This post was last modified: 04-12-2012 05:14 AM by Harti.)
Post: #4
RE: Why an AI for Outwitters is hard to do
I never programmed AI myself but I'd like to add an idea.

I think it would be possible to create an AI with certain heuristics and/or predefined playstyle. Especially with the (very) limited amount of actions a player can take, it should be much easier to decide on certain turns.
The AI will most likely not pass the Turing test (or, well, maybe it will), neither will it be competitive but it would be a decent enough training partner for new players.

This is how it might work:
Each field on the map could have an integer value stating
- what units could reach and attack one on this space
- and for how many damage
- and how much wit that would cost (taking AI's current wit as a measure)
(- if you can retaliate with Snipers or something)
- and if there are enemy production facilities nearby.

If the current thinking unit's health could not sustain the damage, it is not likely to do the turn (or it asks if a Medic can push it a little). Turns would be:

- reach+kill opposing Special unit
- heal unit (if damage is high enough)
- reach+attack opposing base
- reach an opposing unoccupied wit flag
- reach a neutral unoccupied wit flag
- reach+kill unit on neutral wit flag (and get it yourself)
- reach one's own unoccupied wit flag (for defending purposes)
- reach+kill Sniper/Medic units
- reach+kill Heavy units
- reach+kill Soldiers
- kill Runners nearby
- etc...

Each unit (n is usually below 10) is looking for the topmost heuristic to make a match. If there is a match, it will think about what's happening afterwards. It will calculate how much wit the unit itself "totally cost", i.e. recruitment cost (if any), add the amount of wit for movement, add 1 wit for attacking and then subtract the player's unit "total cost". If it's a positive outcome, the unit performs the turn. If it's negative, it may perform the turn nonetheless (if there's a good reason for it, such as killing Special units *cough*) or not.

The unit building process could also run with pretty basic heuristics. If there's not enough visible fields, the AI will decide to spawn a Runner. If there's no Medic and units are injured, it will build a Medic. If there are more Soldiers visible on the player's side than on AI's side, it will build Soldiers or a Heavy. If there's a Heavy coming close, build a Sniper. If there's nothing important to do, save up 1-2 wit.

You could as well give the bot the attribute "rush a lot", causing it to permanently throw everything at the opponent there is.



Oh well. I don't see that this can be implemented during this year but I think it would be really cool to have an offline campaign or something. Big Grin

jesusfuentesh Wrote:  Harti is like the silent lion. He never says any word, but when so, he was just waiting for his victim haha

[Image: sig.png]
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Why an AI for Outwitters is hard to do - Harti - 04-12-2012 05:12 AM

Forum Jump:


User(s) browsing this thread:
1 Guest(s)

Return to TopReturn to Content