AI difficulty

Brainstorm ideas of possible additions to the game. Read this before posting!

Moderator: Forum Moderators

Forum rules
Before posting a new idea, you must read the following:
User avatar
Aethaeryn
Translator
Posts: 1554
Joined: September 15th, 2007, 10:21 pm
Location: Baltimore, Maryland, USA

Post by Aethaeryn »

It could be worth a try...
Aethaeryn (User Page)
Wiki Moderator (wiki)
Latin Translator [wiki=Latin Translation](wiki)[/wiki]
Maintainer of Thunderstone Era (wiki) and Aethaeryn's Maps [wiki=Aethaeryn's Maps](wiki)[/wiki]
BMintern
Posts: 65
Joined: November 23rd, 2006, 4:35 am
Location: Columbus, OH
Contact:

Post by BMintern »

I would be interested in working on an AI. My BfW skills were good at one time, but I haven't played in several months, so I have some catching up to do (especially regarding recent changes). I have a lot of Python programming experience, so that's not an issue. Also, I have taken some grad-level AI classes, and while the "AI" mentioned here is not the same as the AI field of computer science, perhaps some of the methods found there would be useful in an AI. A neural-network-based learning AI would be especially cool.
Dave
Founding Developer
Posts: 7071
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Post by Dave »

BMintern wrote:I would be interested in working on an AI.
Okay, so the way these things work, you just start doing it, and when you have something good enough to show, you post it online. No-one is going to recruit you into some team working on an AI because you say you're interested.

David
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming
User avatar
irrevenant
Moderator Emeritus
Posts: 3692
Joined: August 15th, 2005, 7:57 am
Location: I'm all around you.

Post by irrevenant »

Dave wrote:Okay, so the way these things work, you just start doing it, and when you have something good enough to show, you post it online. No-one is going to recruit you into some team working on an AI because you say you're interested.
In no small part because there is no team working on an AI. :) There's maybe a couple of scattered individual efforts, but that's it...
Angry Andersen
Posts: 205
Joined: September 15th, 2006, 1:22 pm

Post by Angry Andersen »

BMintern wrote:I would be interested in working on an AI. My BfW skills were good at one time, but I haven't played in several months, so I have some catching up to do (especially regarding recent changes). I have a lot of Python programming experience, so that's not an issue. Also, I have taken some grad-level AI classes, and while the "AI" mentioned here is not the same as the AI field of computer science, perhaps some of the methods found there would be useful in an AI. A neural-network-based learning AI would be especially cool.
We had a discussion about NN AIs some months ago in the coder's corner. Basically I think such a thing would only work if it were separated into different specialized NNs for different tasks or maybe a hybrid AI with parts as NN and other parts hardcoded. Random Walk optimization might also work well for some tasks.

Is there any documentation for writing BfW AIs, e.g. a list of all functions a python AI can access?

Is it currently possible to have different AIs in the main program (i.e. in c++) or maybe even choosing which AI to play against when starting a certain campaign?

Can AIs be pitted against each other on multiplayer maps in an automated (e.g. batch) manner? Being able to generate stats on AI performance without too much hassle would greatly aid development.
Clonkinator
Posts: 676
Joined: July 20th, 2006, 4:45 pm
Location: Germany

Post by Clonkinator »

Angry Andersen wrote:Can AIs be pitted against each other on multiplayer maps in an automated (e.g. batch) manner? Being able to generate stats on AI performance without too much hassle would greatly aid development.
This one is for sure, I already watched some matches like these on my own computer. :)
Samantha
Posts: 65
Joined: December 13th, 2007, 3:50 am

Post by Samantha »

The problem with pitting AIs against each other is that what makes an effective opponent for the AI does not necessarily make an effective opponent for a human. Conversely, what makes an effective opponent for a human does not necessarily make a good opponent for the AI.
mowerpower
Posts: 41
Joined: December 17th, 2007, 12:38 pm
Location: Berlin, Alexanderplatz

Wesnoth for AI researchers

Post by mowerpower »

I'm not an AI expert, but I've taught logic to AI students, and refereed a couple of submissions to AI conferences.

I'd guess if you want to appeal to AI experts, there are some things about Wesnoth that might be attractive:
- A lively MP scene & lots of well understood maps;
- an existing AI to provide a baseline;
- fairly simple rules: not as simple as chess, and certainly not as simple as go, but pretty simple for games that can claim to have strategic depth;
- a nice take on randomness and limited knowledge;
- it is open source.

Some things might help:
- Is the choice of python hard to change? It's a fairly sluggish language for one with such weak abstractions (last time I looked it still had no support for metaprogramming). Most AI code is written in Prolog, C++, or Lisp dialects; I've heard of AI being done in Python, but then I've seen it done in Perl, and even awk. In particular, would it be possible to use Prolog in place of Python?
- a simplified era might be attractive; one that retains strategic depth, but with a smaller set of rules. For instance one might ditch income, healing, regeneration, damage classes (eg. impact, arcane & cold), levelling up, ambush, etc. and still have an interesting game. Such things might not be deeply challenging for the AI, but their absence might make it easier to state what it is an AI achieves when writing up results and so get papers accepted by conferences/journals.
- a pdf advertising the virtues of Wesnoth for AI researchers, stating what problems the existing AI solves and what problems it does not. This could be circulated to researchers, who may or may not say which unsolved problems might make interesting projects.

Edit: added point & clarified another.
User avatar
suvorov
Posts: 90
Joined: July 30th, 2006, 11:35 pm
Location: Outer Siberia

Post by suvorov »

Yeah I'm excited about this thread. This is like cutting edge of programming technology running right alongside game theory and all that. I've had the thought of combining a couple very simple effect AI's into a batch AI. That is, by default, the AI is set to random, and an AI is picked out of a list of 2 or 3 different AI's.

This would work well specifically for human vs AI games where the major fault of the AI is its predictability. Take away the predictability and you have a much harder time dealing with the AI.

For example, when I play Survival, I know that the AI always tries to kill the unit it has the highest Chance-To-Kill (CTK). Therefore I often use zombies, and other lame duck units to distract the AI if my leader is in a vulnerable position. Predictably, the AI slaughters my level 0 creep and my leader escapes yet again.
It is good that war is terrible, lest we grow too fond.

-Robert E. Lee
Velensk
Multiplayer Contributor
Posts: 4002
Joined: January 24th, 2007, 12:56 am

Post by Velensk »

One thing that would be nice is if the AI was smarter about recruits. In mp the AI will almost invariably recruit abour a half dozen scouts, then recruit it's heaviest tank units it has available, with the occasional archer, and not alter from that the whole game.
"There are two kinds of old men in the world. The kind who didn't go to war and who say that they should have lived fast died young and left a handsome corpse and the old men who did go to war and who say that there is no such thing as a handsome corpse."
AI
Developer
Posts: 2396
Joined: January 31st, 2008, 8:38 pm

Post by AI »

you can effectively change that with villages_per_scout, if you set it to 0, it won't recruit any scouts other than those specified by recruitment_pattern
Post Reply