Artifical Intelligence for World in Flames

A forum for the discussion of the World in Flames AI Opponent.

Moderator: Shannon V. OKeets

Post Reply
User avatar
terje439
Posts: 6603
Joined: Sun Mar 28, 2004 12:01 pm

RE: Artifical Intelligence for World in Flames

Post by terje439 »

ah my bad then :) hmm guess I agree 100% with you then :D
"Hun skal torpederes!" - Birger Eriksen

("She is to be torpedoed!")
pak19652002
Posts: 146
Joined: Sun Jan 02, 2005 5:40 am
Contact:

RE: Artifical Intelligence for World in Flames

Post by pak19652002 »

I hope you're right. Upon reflection, I think I would probably want to keep a game going against a worthy AI to try new things and kill time between moves from human partners. I'm in favor of it.

Peter
Shannon V. OKeets
Posts: 22165
Joined: Wed May 18, 2005 11:51 pm
Location: Honolulu, Hawaii
Contact:

RE: Artifical Intelligence for World in Flames

Post by Shannon V. OKeets »

ORIGINAL: SamuraiProgrammer

I have been following the posts about the AI for quite some time. I also have been following the posts in the Yahoo WIF group about the same subject.

I have a few comments.

First, do NOT listen to the naysayers!!!!!

THEY said man could not fly.

THEY said man could not reach the moon.

THEY said a computer would never beat a grandmaster at chess.

THEY WERE WRONG.

And now they are saying that a computer will NEVER be able to play a good game of WIF.

We will never know until it is tried.

I hope that the first complaint you get about the game is "The AI CHEATS" or The AI is too hard".

I hope that you are bombarded with questions about what free help you have given the AI.

I hope you succeed and I am pulling for you.

It is a daunting task. Of that there is no doubt. But, as a professional programmer with 20 years experience, I can tell you this. I would not have dreamed that Windows and the internet would accomplish what they have. The only think it took was willpower and money. Perhaps this is the time for WiF.

Go for it! Write a kick a$$ AI and make them run with their tail tucked between their legs.

I believe! [&o]


Dean

I thank you for your vote of confidence. It is somewhat like making a great iron shot into the green and leaving yourself with a four foot putt for birdie - the pressure is on to achieve the desired result. "Don't screw it up now!".

Of course I am optimistic; I am a programmer. Only a person with overwhelming self-confidence can program for a living, believing that each time he/she writes code it will compile cleanly and execute perfectly on the first try. This despite an awesomely large history of having NOT achieved that result. Occasionally things work right the first time and every one is stunned. I maintain my past successes in clear focus before me and pass over my failures as merely part of an astonishingly long learning curve. I find it helps to have Swedish ancestry - my father's side of the family is stubburn about seeing things through to completion to the extent that they are borderline psychotic.

Thanks again for the pompoms and all.
Steve

Perfection is an elusive goal.
dhatchen
Posts: 45
Joined: Fri Dec 23, 2005 8:05 pm

RE: Artifical Intelligence for World in Flames

Post by dhatchen »

I have a couple of ideas for the AI in general, some of which seems to have been at least briefly referred to. Bear with me if I repeat the obvious.

Following the idea of Gambits, I think that every national AIO should have a list of gambits to pull out of the hat once in a while. They would have various grades of low priority for implementation but would keep the AIO fresh after several playings. The Denmark in '39 I mentioned in the USSR AIO topic could be one of these. Of course, you will get many more ideas than could possibly be handled, but the inclusion of the best and a handful of rare ones will cut down AI predictability.

A possible way to dummy up the AI for the lesser skill levels is to increase the chance of the AIO playing the riskier options.

Some of these gambits rely on a multi nation course of action. The potential interaction is tremendous and unprogrammable, but with a restricted list the AIOs would signal each other the intent to try a gambit to see if the allied AIO agrees. If denied, the AIO would have to decide to carry on alone or abandon the idea.

This brings me to my last point. I would like to see a way for a human player to ask allied AIs for certain actions. The AI can always say no, but the effect of asking would at least cause a deliberation and potentially increase the chance of the action. In some cases there will be an immediate answer and in others you will just have to wait and see.

Asking an ally for a DoW would be a example of this. Germany ALWAYS seems to want an early Italian DoW, so this would have little weight, but it the CW wants to go after Italy early, French participation would be nice.

Another important action request would be for the USA to play a certain entry option. The compliance with the request would have to be weighed out based on the US Strategic Plan and the map situation. It could be limited to the available options that effect the asker. The CW could ask for help in the Atlantic or to garrison the NEI, but couldn't ask for the Bearn to be interned.

Asking for paticipation in a multi-nation gambit is difficult to implement, but maybe the more important, common ones could be included.

Just some thoughts.
Shannon V. OKeets
Posts: 22165
Joined: Wed May 18, 2005 11:51 pm
Location: Honolulu, Hawaii
Contact:

RE: Artifical Intelligence for World in Flames

Post by Shannon V. OKeets »

I lilke almost all your suggestions here. The interaction between the AIOs for the individual major powers has not been worked out in detail. But they have a little more flesh on their bones based on what you just posted.

Supporting the relationship between a human player and an AIA (Assistant, to keep it distinct from Opponent) has a lower priority for me than the AIO code proper. However, I need to design a fluid, flexible, and robust way for the AIOs to cooperate with each other and there is no reason not to make that design support human - AIA cooperation too.

I would like to have as many different action plans (strategic, operational, and tactical) for the AIO to choose from as possible, but make the selection of the more riskier ones rare.

For dumbing down the AIO, I still prefer just simply having it make poor choices about what unit types to build and where to deploy them. Though that doesn't sound like much, I believe it can drastically reduce the AIO's ability to attack and defend on land, sea and in the air. It can also affect its ability to interfere with enemy production and maintain its own production. The reason I have less inclination for using risky planning to achieve the same effect has to do with teaching the game to newbies.

It is hard to learn how to play better if your opponent is running around doing crazy things. Instead of focusing on basics, the newbie would get swept up in trying to solve of the bizarre problems/possibilities of WIF that are tangential to playing well.

An unimaginative AIO, who is a little slow about getting its act together, offers the newbie a chance to be in charge of what happens where and when. If the newbie can't force a win under those circumstances, then he has a lot to learn. As the level of difficulty increases, then tossing in the odd screwball seems more appropriate.
Steve

Perfection is an elusive goal.
dhatchen
Posts: 45
Joined: Fri Dec 23, 2005 8:05 pm

RE: Artifical Intelligence for World in Flames

Post by dhatchen »

ORIGINAL: Shannon V. OKeets

For dumbing down the AIO, I still prefer just simply having it make poor choices about what unit types to build and where to deploy them. Though that doesn't sound like much, I believe it can drastically reduce the AIO's ability to attack and defend on land, sea and in the air. It can also affect its ability to interfere with enemy production and maintain its own production. The reason I have less inclination for using risky planning to achieve the same effect has to do with teaching the game to newbies.

It is hard to learn how to play better if your opponent is running around doing crazy things. Instead of focusing on basics, the newbie would get swept up in trying to solve of the bizarre problems/possibilities of WIF that are tangential to playing well.

An unimaginative AIO, who is a little slow about getting its act together, offers the newbie a chance to be in charge of what happens where and when. If the newbie can't force a win under those circumstances, then he has a lot to learn. As the level of difficulty increases, then tossing in the odd screwball seems more appropriate.

I agree with you totally here. I thought of the post later and realized that newbies will, to some extent, model their play after what looks good from the AI. I really like the idea of slow reactions and openings for lower skill levels. It teaches the player how to capitalize on opponent's errors and slows the pace a little.
hakon
Posts: 298
Joined: Fri Apr 15, 2005 12:55 pm

RE: Artifical Intelligence for World in Flames

Post by hakon »

While dreams of an AI that is so good it will have to be "dumbed down" to be beatable by players are indeed nice, i doubt that this will be an issue except against players that dont yet know the rules. In fact, the whole concept of "dumbing down" the AI worries me a bit, for two reasons.

First off, I am worried that "dumbing down" the AI will increase the complexity of the code, resulting in longer development time and possibly more bugs.

Second, I am concerned that the game will be so easy on single player, that there will be no point in playing vs the AI at all. I dont want to sound pessimistic, but how many games are there out there of this kind of complexity that is even remotely capable of challenging a capable human player without being given some kind of an advantage? Making an AI for this kind of game is (in my understanding) immensely harder than for, say, chess, and I dont think there are resources behind this project compareable to those IBM had for making Deep Blue.

Personally, I prefer to give the AI some production advantage (in the range of +10% to +50%), as this allows the tactical AI to be unchanged on all levels.

At least for me, multiplayer WiF will probably still be done on top of a table, so unless single player is decent, I am afraid the game will be reduced to a solitaire trainer.
User avatar
Froonp
Posts: 7998
Joined: Tue Oct 21, 2003 8:23 pm
Location: Marseilles, France
Contact:

RE: Artifical Intelligence for World in Flames

Post by Froonp »

Personally, I prefer to give the AI some production advantage (in the range of +10% to +50%), as this allows the tactical AI to be unchanged on all levels.
Arrrgghhhh, Steve, the cross, the cross !!!!!!!

The devil is here again !!!!
hakon
Posts: 298
Joined: Fri Apr 15, 2005 12:55 pm

RE: Artifical Intelligence for World in Flames

Post by hakon »

ORIGINAL: Froonp
Personally, I prefer to give the AI some production advantage (in the range of +10% to +50%), as this allows the tactical AI to be unchanged on all levels.
Arrrgghhhh, Steve, the cross, the cross !!!!!!!

The devil is here again !!!!

I dont see how being this religious about not giving the AI some advantage helps the game being a success. Throw away the cross, and name one computer game simmilar to wif in complexity, where the AI is on par with a good human player.
Shannon V. OKeets
Posts: 22165
Joined: Wed May 18, 2005 11:51 pm
Location: Honolulu, Hawaii
Contact:

RE: Artifical Intelligence for World in Flames

Post by Shannon V. OKeets »

ORIGINAL: hakon

While dreams of an AI that is so good it will have to be "dumbed down" to be beatable by players are indeed nice, i doubt that this will be an issue except against players that dont yet know the rules. In fact, the whole concept of "dumbing down" the AI worries me a bit, for two reasons.

First off, I am worried that "dumbing down" the AI will increase the complexity of the code, resulting in longer development time and possibly more bugs.

Second, I am concerned that the game will be so easy on single player, that there will be no point in playing vs the AI at all. I dont want to sound pessimistic, but how many games are there out there of this kind of complexity that is even remotely capable of challenging a capable human player without being given some kind of an advantage? Making an AI for this kind of game is (in my understanding) immensely harder than for, say, chess, and I dont think there are resources behind this project compareable to those IBM had for making Deep Blue.

Personally, I prefer to give the AI some production advantage (in the range of +10% to +50%), as this allows the tactical AI to be unchanged on all levels.

At least for me, multiplayer WiF will probably still be done on top of a table, so unless single player is decent, I am afraid the game will be reduced to a solitaire trainer.

I do have some experience in writing AI programs. In college (1968) I wrote a program in Fortran on an IBM 1130 that played 3 dimensional tic-tac-toe (4 by 4 by 4) that beat all its opponents except the math majors. I wrote the AI opponent for Chickamuaga (Atari 800 in assembler - 32 kb of memory) in 1982 that was awarded strategy and tactics war game of the year by Family Computing magazine. Its AI opponent was difficult to beat.

I started studying AI professionally in 1976 and have a lot of experience in industrial applications using a variety of methodologies.

True, WIF is a complicated game. But I play it extremely well (8 years of experience, 6-8 hours every week). I also am receiving some excellent help from other very knowledgeable players.

Though it might come as a surprise to many, my main motivation for working on MWIF is to write the AI opponent. I find the other work involved a lot of fun to do too, but it is creating the AIO the really drives me here. Whether I succeed or not in developing a worthy AI opponent remains to be seen. I certainly have a lot of doubts myself, but I will give it my best shot.
Steve

Perfection is an elusive goal.
hakon
Posts: 298
Joined: Fri Apr 15, 2005 12:55 pm

RE: Artifical Intelligence for World in Flames

Post by hakon »

This sounds very promising. Maybe I am a bit prejudiced when it comes the feasibility of creating a real AI opponent that can play as well as a human.

Still, I think it would be a good idea to include the possibility to give the AI some kind of advantage at the higher difficulty levels. If the AI can beat the strongest human players without "cheating", these extra levels of diffuculty can always be disabled/hidden. I guess it will become clear during playtesting how stong the AI will be.
stretch
Posts: 637
Joined: Mon Dec 17, 2001 10:00 am

RE: Artifical Intelligence for World in Flames

Post by stretch »

I'm trying to keep this in perspective. Writing an AI for WiF at all will be a gargantuan task. Making one that is any good may prove to be a Sisyphean task. Look at War in the Pacific for example. Apparently Gary Grigsby beat himself to death for months working on the AI for that game, yet it can be beat easily by a first timer learning the game as he goes along (i.e. me, winning the war far ahead of historical schedule).

I would argue that coding a competent AI for WiF will be a harder task than for WiTP.

Still, this AI in WiTP has provided me countless hours of fun playing the game solo. I know if I want more of a challenge, I need to play a human. The main purpose of the AI to me was providing an opponent against which I learned how to play at a basic level.

If an AI is written for WiF that accomplishes that task, given the complexity, I think it has to be considered a success.
hakon
Posts: 298
Joined: Fri Apr 15, 2005 12:55 pm

RE: Artifical Intelligence for World in Flames

Post by hakon »

ORIGINAL: stretch

I'm trying to keep this in perspective. Writing an AI for WiF at all will be a gargantuan task. Making one that is any good may prove to be a Sisyphean task. Look at War in the Pacific for example. Apparently Gary Grigsby beat himself to death for months working on the AI for that game, yet it can be beat easily by a first timer learning the game as he goes along (i.e. me, winning the war far ahead of historical schedule).

I would argue that coding a competent AI for WiF will be a harder task than for WiTP.

Still, this AI in WiTP has provided me countless hours of fun playing the game solo. I know if I want more of a challenge, I need to play a human. The main purpose of the AI to me was providing an opponent against which I learned how to play at a basic level.

If an AI is written for WiF that accomplishes that task, given the complexity, I think it has to be considered a success.

I disagree somewhat here. It is perfectly possible to create a challenge for players even in single player. If you give the AI an advantage.....

Of course, if Steve can create an AI as strong as a human, this is a complete non-issue, but otherwise, not giving the AI some advantage will more or less ruin the game experience for me.
Cheesehead
Posts: 362
Joined: Mon Feb 09, 2004 5:48 pm
Location: Appleton, Wisconsin

RE: Artifical Intelligence for World in Flames

Post by Cheesehead »

For dumbing down the AIO, I still prefer just simply having it make poor choices about what unit types to build and where to deploy them.

I just don't see any reason to worry about dumbing down the AI for this game. If Newbie's can't beat your AI, they can always find other newbies to play. And anyone with the brains to understand this game would be motivated for further challenges after an initial drubbing at the hands of the AI.

Personally, I prefer to give the AI some production advantage (in the range of +10% to +50%), as this allows the tactical AI to be unchanged on all levels.

I disagree with any notion of giving production advantages to anyone in this game (AI or human). It would throw off the balance of the game for anyone trying to learn. "Hearts of Iron 2" did this...it was their only way of making the AI a challenge, yet it produced such an unrealistic game that I quit playing. Everything is just wrong about it. Imagine two football teams playing...one is asked to put only 9 men on the field against the full squad of 11 on the other side.
You can't fight in here...this is the war room!
macgregor
Posts: 1049
Joined: Tue Feb 10, 2004 6:44 pm

RE: Artifical Intelligence for World in Flames

Post by macgregor »

I agree with Cheesehead. Though I'm sure Steve will make a great AI. How long it will take him is another question. Certainly too long for someone with no intention of utilizing it.
P8654
Posts: 6
Joined: Wed Dec 21, 2005 10:33 pm

RE: Artifical Intelligence for World in Flames

Post by P8654 »

I agree that their should be no production advantage given to any opponent (maybe as an option). I usually only play single player. I dislike games where the computer breaks the rules and I have to follow them. The computer doesn't have to be deep blue but it should present a challege to novice players.
"It is better to be on the ground wishing you were in the air than in the air wishing you were on the ground."
Glen Felzien
Posts: 70
Joined: Sun May 21, 2000 8:00 am
Location: Swan Hills, Alberta, CDN

RE: Artifical Intelligence for World in Flames

Post by Glen Felzien »

I must echo the dislike for needed cheats for AIOs. I understand why it is done but I find it disappointing. I want a challenge from a AIO that is playing better than I and not because it has greater resources at hand. That said, is it difficult to add such a feature for those that dont mind. Maybe a slider function that can be chosen at the campaign start: Less advantage - Even - Greater advantage. Somthing like that maybe?

Finally, will there be a hotseat function? With FoW, solitaire games would be better than table top solitaire.
Glen
Shannon V. OKeets
Posts: 22165
Joined: Wed May 18, 2005 11:51 pm
Location: Honolulu, Hawaii
Contact:

RE: Artifical Intelligence for World in Flames

Post by Shannon V. OKeets »

ORIGINAL: Glen Felzien

I must echo the dislike for needed cheats for AIOs. I understand why it is done but I find it disappointing. I want a challenge from a AIO that is playing better than I and not because it has greater resources at hand. That said, is it difficult to add such a feature for those that dont mind. Maybe a slider function that can be chosen at the campaign start: Less advantage - Even - Greater advantage. Somthing like that maybe?

Finally, will there be a hotseat function? With FoW, solitaire games would be better than table top solitaire.

The design specifications I am working to require: hot seat, mulitple player internet, PBEM , and solitaire against an AI opponent.

The first was done by Chris for CWIF and pretty much works.

The second was in development for CWIF and functions to some degree but has some lingering problems.

Neither the third nor the fourth was ever even attemnpted by CWIF.

I am designing the multiple player internet capability from scratch, basing it using INDY 10, which suits me better as the underlying software for live internet communications. INDY 10 also enables PBEM communications.

For the PBEM capability, I have a full design specification written for modifying the sequence of play (available upon request to Steve@PatternDiscovery.us).

For the AI Opponent I am up to 80 pages for the design specification with a lot more yet to do.
Steve

Perfection is an elusive goal.
stretch
Posts: 637
Joined: Mon Dec 17, 2001 10:00 am

RE: Artifical Intelligence for World in Flames

Post by stretch »

Steve,

I wanted to point out that my reservations about an AI for WiF ever being any good is not a critique of your ability (or those who help). I (we all) deeply appreciate your hard work and I wanted to make sure I wasn't misunderstood.

I just don't want it to hang up development, which it easily could. I think in order to get a really good AI we'd need to convert Froonp's brain into a computer program. (a-la Dr. Daystrom on Star Trek TOS, Ep 53, "the ultimate computer".. and no I’m not an uber geek I had to look that up) .
User avatar
Neilster
Posts: 2989
Joined: Mon Oct 27, 2003 1:52 pm
Location: Devonport, Tasmania, Australia

RE: Artifical Intelligence for World in Flames

Post by Neilster »

1. The mechanics of MWiF have been playtested to death by thousands of experienced players. Hence, in comparison to most computer games there is a huge amount of background knowledge to assist in producing the AI.

2. The head programmer is experienced both in WiF and AI techniques.

3. Unlike most games, it's not being rushed out to get a quick return on investment ("We'll patch the problems later" etc).

4. MWiF's complexity is already nicely constrained by the turn/phase structure. I believe this will assist in writing the AI.

5. There will be a proper testing program.

As a result I'm confident the AI will be significantly better than that in the vast majority of games. A look at the posts of composer99 and Froonp on the grand strategy threads might be worthwhile.

Cheers, Neilster
Cheers, Neilster
Post Reply

Return to “AI Opponent Discussion”