AI/Realism
Moderator: AlvaroSousa
RE: AI/Realism
Another thing that you can look is the behaviour of the computer in Poland. Nearly in all games the AI leaves the Poland corps close to Danzing without zocs near. That means that you can move it in suicidal mission that use to end in the capture or Berlin or Stettin by turn 3...or the overrun of a cpuple of air units. I best case situation that move make nearle all the Lutwaffe redeply, hurting his chances of conquering Poland in time.
Another thing that I realized is that the AI moves too much trying to get the best odd possible, but due the efficiency loss, she enda fdoing a waltz with his units instead of attacking. The funny thing is that after that, she finishes making attacks with a single unit with odds lower than 2:1.
I have the feeling that this is the difficult thing to solve, but maybe a scriot in wich if the computer manages to get a 4:1 or more she attacks instead of keep moving his units? Also an script to not commit suicidal attacks under 2:1 or less with a single unit? I think that this would make that the AI would be able to do ore damage to the player without crippling his units in the process.
This said, since I´m not programmer, I don't have any idea if this could be implemented, just a random thought.
ps: Also noticed that the German AI dont take care of his subs, so she eventually lose them in the convoy attacks, Maybe some script to stop moving subs with 1 or 2 steps remaining, and repairing them instead.
Another thing that I realized is that the AI moves too much trying to get the best odd possible, but due the efficiency loss, she enda fdoing a waltz with his units instead of attacking. The funny thing is that after that, she finishes making attacks with a single unit with odds lower than 2:1.
I have the feeling that this is the difficult thing to solve, but maybe a scriot in wich if the computer manages to get a 4:1 or more she attacks instead of keep moving his units? Also an script to not commit suicidal attacks under 2:1 or less with a single unit? I think that this would make that the AI would be able to do ore damage to the player without crippling his units in the process.
This said, since I´m not programmer, I don't have any idea if this could be implemented, just a random thought.
ps: Also noticed that the German AI dont take care of his subs, so she eventually lose them in the convoy attacks, Maybe some script to stop moving subs with 1 or 2 steps remaining, and repairing them instead.
-
kennonlightfoot
- Posts: 1695
- Joined: Tue Aug 15, 2006 7:51 pm
- Contact:
RE: AI/Realism
Poland probably is the second easiest situation to script for the AI (easiest would be Denmark if it wasn't for weather). But even it will give the computer AI considerable problems. The initial position is good for scripting because you can tell the AI exactly what it needs to do because you know where every unit and objective city is. But unless you give the AI enough bonuses to destroy every unit it can attack, turn 2 requires analysis that only a higher level AI can handle. Units have moved and objectives are screened. The AI has to plan how to break that screen and take Warsaw. This requires more than a script although if you have enough bonuses it can just power its way through them.
Main trouble I saw in my game is the AI seems to not know it needs to put the subs on a convoy route. Interestingly, as the game progressed and the Germans got more than three sub groups the AI got much better at it. In late 41 they started doing significant damage to the UK shipping. About the only thing in needed to do was know how to use Oilers. But I think that was due to it not expecting to have to fight without French bases.
But the kind of AI that could "look" at the the layers required to actually plan and execute even a defense only plan for a game this complex are far beyond what a PC can do even if backed with deep pockets and lots of AI developers.
Main trouble I saw in my game is the AI seems to not know it needs to put the subs on a convoy route. Interestingly, as the game progressed and the Germans got more than three sub groups the AI got much better at it. In late 41 they started doing significant damage to the UK shipping. About the only thing in needed to do was know how to use Oilers. But I think that was due to it not expecting to have to fight without French bases.
But the kind of AI that could "look" at the the layers required to actually plan and execute even a defense only plan for a game this complex are far beyond what a PC can do even if backed with deep pockets and lots of AI developers.
Kennon
RE: AI/Realism
ORIGINAL: kennonlightfoot
But the kind of AI that could "look" at the the layers required to actually plan and execute even a defense only plan for a game this complex are far beyond what a PC can do even if backed with deep pockets and lots of AI developers.
I guess I never got the memo that said I couldn't do what I in fact did with my Advanced Third Reich mod. [8|]
Have you ever even looked into the scripting capabilities of WarPlan or Strategic Command, or do you enjoy making bogus assertions and expect anybody to take you seriously? As I mentioned above, it takes a LOT of time and patience, combined with a LOT of experience with the game and the AI performance, to create a challenging computer opponent. It is difficult; it is not impossible. The real problem is that developers stop developing a particular game before moving on to their next game, never quite reaching AI nirvana and leaving players eternally disappointed. Third Reich PC computer game is one such example; close but never got there.
I would also argue that a WWII ETO game is not as complex as you make it out to be. There are two sides, Axis and Allies, with a fairly well-defined default strategy for both sides plus several major alternatives (Sea Lion, Spain, Turkey) and other variations here and there. It's not rocket science. Napoleonic Empires in Arms, on the other hand, with seven major powers and changing alliances over the period 1805-1815, is a more complex game in itself and the C++ coding is more difficult than text scripting. I do both; I know.
Bill Macon
Empires in Arms Developer
Empires in Arms Developer
- AlvaroSousa
- Posts: 12124
- Joined: Mon Jul 29, 2013 7:13 pm
- Contact:
RE: AI/Realism
The thing is that we can work the system till the cow comes home. Sometimes a developed A.I. system has limitations and you have to restart basically. Coding for scripts takes time, coding for A.I. even more time. Then testing even MORE time. What developers will not tell you is that there is a cost analysis that goes into design over the longevity of the game.
For example as well as WP has done I have effectively only made minimum wage for my hours put in over profit minus costs for 3 years of full time work.
Since the sales of WarPlan are going down should I invest another 1000 hours, ~6 months, in vastly improving the A.I. around all the flaws I currently see in my first attempt at a game?
The answer is that I would be shooting myself in my financial foot if I did. Needless to say I still work on A.I. for the game because I enjoy it. But somethings will require a lot of work around with many hours put in. This is what developers go through. So if you have a developer living off of games like WP then this is the struggle they have to make.
I literally make more an hour playing poker by far than I have profit in WP. But I enjoy this more.
So what is done then? The next version is improved and that is how things are done. Developers take what works, improve it, and pass it on to the next version of the game. Now some developers, and this is just my opinion, just reskin their game, with minor improvements. I don't do that and I know Hubert, from SC3, doesn't. We email each other discussing things.
I have a specific sequence of events for WP. WP2 will be what I really wanted to create. So why didn't I do it in the first place? It would be too difficult to create and design. Just like making a car you need to start small before you make a race car.
The ETO isn't complex to a human. But the small details in operational actions is for an A.I.. For example in my recent game my opponent pulled off a massive operation involving 3 paras and 5 tanks which cut off part of a front. I had my Stalingrad. A.I. can't do this without a Google Deep mind server farm. Certainly not one man.
Next it also time. Do you want to wait 10m while the A.I. does massive calculations? And this is my i7. If someone has an i3 or i5 CPU that could be 20m. It's a scale of ratio. WP wouldn't sell at all if I did that.
I do little changes on the engine I don't post in the logs because they are often unnoticeable to the players. There is a new one I am considering currently about the A.I.'s aggression.
For example as well as WP has done I have effectively only made minimum wage for my hours put in over profit minus costs for 3 years of full time work.
Since the sales of WarPlan are going down should I invest another 1000 hours, ~6 months, in vastly improving the A.I. around all the flaws I currently see in my first attempt at a game?
The answer is that I would be shooting myself in my financial foot if I did. Needless to say I still work on A.I. for the game because I enjoy it. But somethings will require a lot of work around with many hours put in. This is what developers go through. So if you have a developer living off of games like WP then this is the struggle they have to make.
I literally make more an hour playing poker by far than I have profit in WP. But I enjoy this more.
So what is done then? The next version is improved and that is how things are done. Developers take what works, improve it, and pass it on to the next version of the game. Now some developers, and this is just my opinion, just reskin their game, with minor improvements. I don't do that and I know Hubert, from SC3, doesn't. We email each other discussing things.
I have a specific sequence of events for WP. WP2 will be what I really wanted to create. So why didn't I do it in the first place? It would be too difficult to create and design. Just like making a car you need to start small before you make a race car.
The ETO isn't complex to a human. But the small details in operational actions is for an A.I.. For example in my recent game my opponent pulled off a massive operation involving 3 paras and 5 tanks which cut off part of a front. I had my Stalingrad. A.I. can't do this without a Google Deep mind server farm. Certainly not one man.
Next it also time. Do you want to wait 10m while the A.I. does massive calculations? And this is my i7. If someone has an i3 or i5 CPU that could be 20m. It's a scale of ratio. WP wouldn't sell at all if I did that.
I do little changes on the engine I don't post in the logs because they are often unnoticeable to the players. There is a new one I am considering currently about the A.I.'s aggression.
Creator Kraken Studios
- WarPlan
- WarPlan Pacific
Designer Strategic Command
- Brute Force (mod) SC2
- Assault on Communism SC2
- Assault on Democracy SC2
- Map Image Importer SC3
- WarPlan
- WarPlan Pacific
Designer Strategic Command
- Brute Force (mod) SC2
- Assault on Communism SC2
- Assault on Democracy SC2
- Map Image Importer SC3
-
kennonlightfoot
- Posts: 1695
- Joined: Tue Aug 15, 2006 7:51 pm
- Contact:
RE: AI/Realism
Third Right isn't as complex a game as this one. I can't really comment on it since I never played the computer version just the old board game and that was many years ago.
The problem with script driven AI is it can't embed the kind of logic needed to handle things when they don't go as planned. Also, in these large games it is very difficult for the AI to handle the logic to maintain continuous lines that are strong enough not to be broken. A player can tell at a glance at the map where their opponent is building up enough force to break his line. The AI doesn't do "glance at the map" very well. A good example is my game against the AI. I played it out into 1942. When the Russians join the war the AI wasn't scripted for handling two fronts in this way. It continued to maintain a double line against France and actually push them back some. But on the Eastern front it did almost nothing and Russia took Germany about as fast as it could move its units. Berlin was taken in about five turns.
As the number of hexes that must be controlled increase relative to the number of units available to control them the decisions the AI must make start getting into the trillions. Building the logic to make the AI capable of handling this is far beyond a PC's capacity.
What these games have is "Weak AI". Which more or less follows plain "IF THEN" rules and is implemented in normal programming languages. It can't do anything that the programmer didn't explicitly set it up for. This is my level of expertise in AI. I am trained in Real Time control systems using high level languages like Prolog, Gensym G2, Ladder Logic in Control Systems, etc. Games like WarPlan are much to complex for this level of AI.
And, I doubt any game companies can afford Strong AI. Maybe in the future when AI becomes more generally available in low cost systems.
The problem with script driven AI is it can't embed the kind of logic needed to handle things when they don't go as planned. Also, in these large games it is very difficult for the AI to handle the logic to maintain continuous lines that are strong enough not to be broken. A player can tell at a glance at the map where their opponent is building up enough force to break his line. The AI doesn't do "glance at the map" very well. A good example is my game against the AI. I played it out into 1942. When the Russians join the war the AI wasn't scripted for handling two fronts in this way. It continued to maintain a double line against France and actually push them back some. But on the Eastern front it did almost nothing and Russia took Germany about as fast as it could move its units. Berlin was taken in about five turns.
As the number of hexes that must be controlled increase relative to the number of units available to control them the decisions the AI must make start getting into the trillions. Building the logic to make the AI capable of handling this is far beyond a PC's capacity.
What these games have is "Weak AI". Which more or less follows plain "IF THEN" rules and is implemented in normal programming languages. It can't do anything that the programmer didn't explicitly set it up for. This is my level of expertise in AI. I am trained in Real Time control systems using high level languages like Prolog, Gensym G2, Ladder Logic in Control Systems, etc. Games like WarPlan are much to complex for this level of AI.
And, I doubt any game companies can afford Strong AI. Maybe in the future when AI becomes more generally available in low cost systems.
Kennon
-
Cigar King
- Posts: 80
- Joined: Sun Oct 10, 2010 8:55 pm
RE: AI/Realism
The AI works as well as can be expected. Tweeks are fine, but, I doubt any amount of reasonable work would allow it to compete with a skilled human. Consider how long they worked on computer chess before it was able to beat a proficient human.
Give the AI some bonuses if it is not challenging enough for you. Solving some of the game play issues would, IMHO, provide more bang for the buck than focusing on the AI.
Give the AI some bonuses if it is not challenging enough for you. Solving some of the game play issues would, IMHO, provide more bang for the buck than focusing on the AI.
RE: AI/Realism
ORIGINAL: kennonlightfoot
What these games have is "Weak AI". Which more or less follows plain "IF THEN" rules and is implemented in normal programming languages. It can't do anything that the programmer didn't explicitly set it up for. This is my level of expertise in AI.
Alright, one more response. I invite you to study the scripting capabilities in WarPlan and Strategic Command. I am not convinced that you understand.
A very simple example of scripting variability is IF 2-4 enemy units approach within range 3-5 of an objective, THEN do something (deploy extra unit(s), initiate an attack, set up a defense line, etc.) So when 3 enemy units are within 4 hexes, what happens? You don't know. It might trigger the response, or it might not. You scripted this, but you cannot know explicitly what will happen. Almost like playing another person. You don't know what your opponent is going to do, something brilliant or something stupid. In this sense, the scripted computer opponent behaves in the same way. Also, there is "fuzzy logic" in the generic AI routines, at least for Strategic Command and I think Al has implemented this also.
Anyways, my final comment on all this and Al just confirmed above what I've been saying, is the time and effort necessary to create an exceptionally challenging computer opponent is generally more than a developer can afford to invest. I focused on Third Reich at the grand strategic level because it is more manageable. WarPlan at a more grand operational level is indeed more complex. That makes it more difficult, but again not impossible.
Bill Macon
Empires in Arms Developer
Empires in Arms Developer
-
kennonlightfoot
- Posts: 1695
- Joined: Tue Aug 15, 2006 7:51 pm
- Contact:
RE: AI/Realism
My opinion is the AI can be used to learn the basics of the game but the game is to complex for it to handle campaigns. You can crank up the bonuses so it won't be a cake walk but it will still use very basic tactics. It's just the nature of the beast.
However, I do think it could handle more restricted scenarios that don't require it to do strategic planning.
That said, I will try and write a scenario for Poland just to see if I can do it. Hopefully, with such a limited scope I can make it work at a reasonable level for both sides.
However, I do think it could handle more restricted scenarios that don't require it to do strategic planning.
That said, I will try and write a scenario for Poland just to see if I can do it. Hopefully, with such a limited scope I can make it work at a reasonable level for both sides.
Kennon
- AlvaroSousa
- Posts: 12124
- Joined: Mon Jul 29, 2013 7:13 pm
- Contact:
RE: AI/Realism
Interestingly A.I. is my favorite part of coding.
Creator Kraken Studios
- WarPlan
- WarPlan Pacific
Designer Strategic Command
- Brute Force (mod) SC2
- Assault on Communism SC2
- Assault on Democracy SC2
- Map Image Importer SC3
- WarPlan
- WarPlan Pacific
Designer Strategic Command
- Brute Force (mod) SC2
- Assault on Communism SC2
- Assault on Democracy SC2
- Map Image Importer SC3
RE: AI/Realism
ORIGINAL: AlvaroSousa
Interestingly A.I. is my favorite part of coding.
+1
After working on game bugs past several weeks, it was refreshing to do some AI work this weekend.
Bill Macon
Empires in Arms Developer
Empires in Arms Developer
-
kennonlightfoot
- Posts: 1695
- Joined: Tue Aug 15, 2006 7:51 pm
- Contact:
RE: AI/Realism
Poland with Axis AI and my playing Allied.
The scripting allows you to set objectives which in the case of Poland are a few cities and Warsaw. It is as simple a situation as it gets so its a good demonstration of the limits to scripted AI. It "knows" what it has to do to win. But each individual unit has its own "AI" telling it how to react to things around it. This makes it easy to get distracted doing useless details while ignoring its main objective.
In this test it did well on the Axis Sept 1st turn but it lakes the ability to "look" toward the next turn. So it destroyed the Cav unit that blocks the route to Lodz but didn't put enough units against Lodz to take it. It took Krakov but that is actually an error since it pushed the Polish Armor there out instead of trapping it there. It also failed to take Poznan. It did spend a lot of manpower destroying all the small units it could to the north but that left it not threatening Warsaw from that direction.
I moved the armor into Warsaw and set up units in every hex around it. Since there was no threat from the north I could put the big units facing SW. I put a little cavalry unit in Lodz. I moved the Mountain unit to just north of Krakov. Also moved the surviving 3-5 below Danzig to cut the railroad. These moves are little laser lights for the AI cat.
AI Axis turn Sept 29 was spent killing the mice. A huge force was sent north to take out the 3-5. Poznan was finally taken but attracted one of the armored leaving nothing to threaten Warsaw from the north. And, I have no idea what it made so many moves around Breslov.
The results of Axis turn Sept 29 is shown below. My move puts a five hex wall around Warsaw. But with a Gr Panzer next to Warsaw it should be an easy kill if the Axis AI can keep its eye on the objective.

The scripting allows you to set objectives which in the case of Poland are a few cities and Warsaw. It is as simple a situation as it gets so its a good demonstration of the limits to scripted AI. It "knows" what it has to do to win. But each individual unit has its own "AI" telling it how to react to things around it. This makes it easy to get distracted doing useless details while ignoring its main objective.
In this test it did well on the Axis Sept 1st turn but it lakes the ability to "look" toward the next turn. So it destroyed the Cav unit that blocks the route to Lodz but didn't put enough units against Lodz to take it. It took Krakov but that is actually an error since it pushed the Polish Armor there out instead of trapping it there. It also failed to take Poznan. It did spend a lot of manpower destroying all the small units it could to the north but that left it not threatening Warsaw from that direction.
I moved the armor into Warsaw and set up units in every hex around it. Since there was no threat from the north I could put the big units facing SW. I put a little cavalry unit in Lodz. I moved the Mountain unit to just north of Krakov. Also moved the surviving 3-5 below Danzig to cut the railroad. These moves are little laser lights for the AI cat.
AI Axis turn Sept 29 was spent killing the mice. A huge force was sent north to take out the 3-5. Poznan was finally taken but attracted one of the armored leaving nothing to threaten Warsaw from the north. And, I have no idea what it made so many moves around Breslov.
The results of Axis turn Sept 29 is shown below. My move puts a five hex wall around Warsaw. But with a Gr Panzer next to Warsaw it should be an easy kill if the Axis AI can keep its eye on the objective.

- Attachments
-
- PolandSep15.jpg (61.64 KiB) Viewed 301 times
Kennon
-
kennonlightfoot
- Posts: 1695
- Joined: Tue Aug 15, 2006 7:51 pm
- Contact:
RE: AI/Realism
Poland AI continued Oct 13th Turn:
But because the AI scattered its units all over the map losing its focus on Warsaw. I doesn't have much offensive power other than the armor next to Warsaw. And, then it rained. The AI probably would have still taken Warsaw on this 4th turn if not for rain but that is what tends to happen in October.
Add to that the ease of distracting the AI. It attacks the surround units with the armor to clear them out but with the loss of movement due to Rain there is nothing left to take Warsaw with. Leaving the situation shown below. Finally on the Nov 10th turn the Axis AI took Poland. Five turns and it still has to get ready to take France and the lower countries.

But because the AI scattered its units all over the map losing its focus on Warsaw. I doesn't have much offensive power other than the armor next to Warsaw. And, then it rained. The AI probably would have still taken Warsaw on this 4th turn if not for rain but that is what tends to happen in October.
Add to that the ease of distracting the AI. It attacks the surround units with the armor to clear them out but with the loss of movement due to Rain there is nothing left to take Warsaw with. Leaving the situation shown below. Finally on the Nov 10th turn the Axis AI took Poland. Five turns and it still has to get ready to take France and the lower countries.

- Attachments
-
- PolandOct27.jpg (54.61 KiB) Viewed 301 times
Kennon
- AlvaroSousa
- Posts: 12124
- Joined: Mon Jul 29, 2013 7:13 pm
- Contact:
RE: AI/Realism
For the human mind you don't notice the difference in complexities from this and say Civilization unit movement.
For the A.I. it is exponentially more complex.
It's like comparing chess to go.
When I was developing this I realized most hex game developers cookie cutter each other's system and I didnt understand why. Now I do. It is much simpler to code and write A.I. for. MUUUCH simpler.
WP has multihex attacks, ZoC based on movement not stoppage, different size units. It is a lot harder to code.
What you are showing here is an abstract thinking concept. You need to balance X forces with Y forces if the Poles spazz out and run amok. Then positions those forces correctly. It is much easier to do for a human than an A.I.
Now if you want to give me a google deep mind server farm....
For the A.I. it is exponentially more complex.
It's like comparing chess to go.
When I was developing this I realized most hex game developers cookie cutter each other's system and I didnt understand why. Now I do. It is much simpler to code and write A.I. for. MUUUCH simpler.
WP has multihex attacks, ZoC based on movement not stoppage, different size units. It is a lot harder to code.
What you are showing here is an abstract thinking concept. You need to balance X forces with Y forces if the Poles spazz out and run amok. Then positions those forces correctly. It is much easier to do for a human than an A.I.
Now if you want to give me a google deep mind server farm....
Creator Kraken Studios
- WarPlan
- WarPlan Pacific
Designer Strategic Command
- Brute Force (mod) SC2
- Assault on Communism SC2
- Assault on Democracy SC2
- Map Image Importer SC3
- WarPlan
- WarPlan Pacific
Designer Strategic Command
- Brute Force (mod) SC2
- Assault on Communism SC2
- Assault on Democracy SC2
- Map Image Importer SC3
