When does the AI pick its strategy?

Please post here for questions and discussion about scenario design, art and sound modding and the game editor for WITP Admiral's Edition.

Moderators: wdolson, MOD_War-in-the-Pacific-Admirals-Edition

PaulWRoberts
Posts: 905
Joined: Sun Apr 22, 2001 8:00 am

When does the AI pick its strategy?

Post by PaulWRoberts »

I know that the AI has several strategy files to choose from. I'm wondering when the AI actually locks in which strategy it's going to use for a game.

Actually this is what I'm wondering: I've just put six or seven hours of work into an initial Allied setup for the grand campaign. I haven't run a turn yet. If I use this setup to begin multiple games, will the AI use the same strategy file every time, or does it pick one randomly only when the first turn is run?
Alfred
Posts: 6683
Joined: Thu Sep 28, 2006 7:56 am

RE: When does the AI pick its strategy?

Post by Alfred »

Before the first turn handover to the Allied player.  The Japanese AI will use the same script every time you run that save.
 
Alfred
PaulWRoberts
Posts: 905
Joined: Sun Apr 22, 2001 8:00 am

RE: When does the AI pick its strategy?

Post by PaulWRoberts »

Well, that's less than optimal.
User avatar
HansBolter
Posts: 7457
Joined: Thu Jul 06, 2006 12:30 pm
Location: United States

RE: When does the AI pick its strategy?

Post by HansBolter »

Since the AI has to implement its first turn before you implement yours I don't see how it can be any other way.

I often run through 3-5 AI first turns before I get one where the AI does well enough for me to want to play on.
Some iterations of first turns can be pretty paltry in the way of numbers of ships sunk and I want the AI to start with a good first turn.
Hans

PaulWRoberts
Posts: 905
Joined: Sun Apr 22, 2001 8:00 am

RE: When does the AI pick its strategy?

Post by PaulWRoberts »

ORIGINAL: HansBolter

Since the AI has to implement its first turn before you implement yours I don't see how it can be any other way.

I don't understand. What does the AI implement between my clicking on the scenario selection and giving the first of my orders and settings?

Does it "give all of its orders" right then? Since its orders can't be affected by anything I have done (as I have not done anything yet), it's too bad the "strategy file selection" can't be delayed until the player hits Go for the first turn.
I often run through 3-5 AI first turns before I get one where the AI does well enough for me to want to play on.
Some iterations of first turns can be pretty paltry in the way of numbers of ships sunk and I want the AI to start with a good first turn.

Does this mean that you do 3-5 full setups (requiring several hours each) before sticking with a game, or is there some shortcut that I don't know about? I'm hoping there's a shortcut...

Thanks for the replies!
User avatar
wdolson
Posts: 7690
Joined: Tue Jun 27, 2006 9:56 pm
Location: Near Portland, OR

RE: When does the AI pick its strategy?

Post by wdolson »

If someone analyzed the AI scripts, they could determine which ones were more aggressive in the early going. Remove the ones that were too passive and you should be pretty much guaranteed a strong start.

Bill
WIS Development Team
User avatar
HansBolter
Posts: 7457
Joined: Thu Jul 06, 2006 12:30 pm
Location: United States

RE: When does the AI pick its strategy?

Post by HansBolter »

ORIGINAL: Paul Roberts

ORIGINAL: HansBolter

Since the AI has to implement its first turn before you implement yours I don't see how it can be any other way.

I don't understand. What does the AI implement between my clicking on the scenario selection and giving the first of my orders and settings?

Does it "give all of its orders" right then? Since its orders can't be affected by anything I have done (as I have not done anything yet), it's too bad the "strategy file selection" can't be delayed until the player hits Go for the first turn.
I often run through 3-5 AI first turns before I get one where the AI does well enough for me to want to play on.
Some iterations of first turns can be pretty paltry in the way of numbers of ships sunk and I want the AI to start with a good first turn.

Does this mean that you do 3-5 full setups (requiring several hours each) before sticking with a game, or is there some shortcut that I don't know about? I'm hoping there's a shortcut...

Thanks for the replies!


Playing the AI I play Historical first turn with surprise.

The Allies don't get to do anything until after the AI runs it's first turn.

I haven't invested anything prior to issuing my first orders except the time necessary to watch the AIs first turn resolution.

IMHO any other form of start is giving the player an advantage over the AI the player really doesn't need.

Hans

PaulWRoberts
Posts: 905
Joined: Sun Apr 22, 2001 8:00 am

RE: When does the AI pick its strategy?

Post by PaulWRoberts »

ORIGINAL: HansBolter
Playing the AI I play Historical first turn with surprise.

The Allies don't get to do anything until after the AI runs it's first turn.

I haven't invested anything prior to issuing my first orders except the time necessary to watch the AIs first turn resolution.

IMHO any other form of start is giving the player an advantage over the AI the player really doesn't need.

Ah, I see. I should have specified that I was doing a setup for the Dec 8 campaign start, so Dec 7th surprise doesn't apply. When I start the scenario, I'm taken right to the first orders phase and the Japanese AI hasn't done anything yet.

In this case, has the AI already picked its strategy file, or does it do so when I run the first turn after giving all my initial orders?
User avatar
HansBolter
Posts: 7457
Joined: Thu Jul 06, 2006 12:30 pm
Location: United States

RE: When does the AI pick its strategy?

Post by HansBolter »

ORIGINAL: Paul Roberts

ORIGINAL: HansBolter
Playing the AI I play Historical first turn with surprise.

The Allies don't get to do anything until after the AI runs it's first turn.

I haven't invested anything prior to issuing my first orders except the time necessary to watch the AIs first turn resolution.

IMHO any other form of start is giving the player an advantage over the AI the player really doesn't need.

Ah, I see. I should have specified that I was doing a setup for the Dec 8 campaign start, so Dec 7th surprise doesn't apply. When I start the scenario, I'm taken right to the first orders phase and the Japanese AI hasn't done anything yet.

In this case, has the AI already picked its strategy file, or does it do so when I run the first turn after giving all my initial orders?


Someone with more knowledge than I will have to answer that one.
Hans

Alfred
Posts: 6683
Joined: Thu Sep 28, 2006 7:56 am

RE: When does the AI pick its strategy?

Post by Alfred »

ORIGINAL: Paul Roberts

ORIGINAL: HansBolter
Playing the AI I play Historical first turn with surprise.

The Allies don't get to do anything until after the AI runs it's first turn.

I haven't invested anything prior to issuing my first orders except the time necessary to watch the AIs first turn resolution.

IMHO any other form of start is giving the player an advantage over the AI the player really doesn't need.

Ah, I see. I should have specified that I was doing a setup for the Dec 8 campaign start, so Dec 7th surprise doesn't apply. When I start the scenario, I'm taken right to the first orders phase and the Japanese AI hasn't done anything yet.

In this case, has the AI already picked its strategy file, or does it do so when I run the first turn after giving all my initial orders?

1. Whether you play the 7th or 8th or any other scenario is irrelevant. The Japanese side, whether it is being played by a human or the computer, always gets to input its orders first. Then, and only then, does the Allied player get to input his orders. After both sides have inputted their orders, then, and only then, are the orders carried out and the turn resolution proceeded with. This is obvious in every turn played in an ongoing game. It is also consistent with what is said in s.3.0 of the manual.

2. The computer scripts are not altered to adapt on the go to what the human player does. When would it become obvious what strategy the human player is pursuing? Turn 10 or turn 50? Do you expect the AI to do nothing until the human plan is ascertained? Besides in any December 1941 scenario, the Japanese side has the initiative and determines where it is going to attack.

The current sequence of play is logical for a game of this sort. If you don't agree, I suggest you start off a new Dec 8 game playing as Japan and refuse to give any orders to your forces that first turn. You will still be in a better position for your second turn than would the AI if it followed your preferred course of action of Japan doing nothing on the first turn for a minimum.

Alfred
PaulWRoberts
Posts: 905
Joined: Sun Apr 22, 2001 8:00 am

RE: When does the AI pick its strategy?

Post by PaulWRoberts »

ORIGINAL: Alfred]

1. Whether you play the 7th or 8th or any other scenario is irrelevant. The Japanese side, whether it is being played by a human or the computer, always gets to input its orders first. Then, and only then, does the Allied player get to input his orders. After both sides have inputted their orders, then, and only then, are the orders carried out and the turn resolution proceeded with. This is obvious in every turn played in an ongoing game. It is also consistent with what is said in s.3.0 of the manual.

2. The computer scripts are not altered to adapt on the go to what the human player does. When would it become obvious what strategy the human player is pursuing? Turn 10 or turn 50? Do you expect the AI to do nothing until the human plan is ascertained? Besides in any December 1941 scenario, the Japanese side has the initiative and determines where it is going to attack.

The current sequence of play is logical for a game of this sort. If you don't agree, I suggest you start off a new Dec 8 game playing as Japan and refuse to give any orders to your forces that first turn. You will still be in a better position for your second turn than would the AI if it followed your preferred course of action of Japan doing nothing on the first turn for a minimum.

Alfred

My only question is whether I can re-use an initial set-up to start new games, facing a different AI plan each time. I'm not sure why you bring "adaptability" into it. I'm just hoping it's possible to save the six or seven hours necessary to go from set-up to turn 1.

If I understand you correctly, the answer is No for the Allies but (because Japan "goes first") Yes for Japan. Is that so?
User avatar
wdolson
Posts: 7690
Joined: Tue Jun 27, 2006 9:56 pm
Location: Near Portland, OR

RE: When does the AI pick its strategy?

Post by wdolson »

Actually the AI script is not chosen on the running of the first turn. It is chosen when you select and start the scenario. You will lose your first turn if you restart to get another AI script.

Sorry, it's the way things shake out. Since it's a very long game, you could hold off doing a lot of your initial stuff for a couple of days of game time.

Bill
WIS Development Team
Buck Beach
Posts: 1974
Joined: Sun Jun 25, 2000 8:00 am
Location: Upland,CA,USA

RE: When does the AI pick its strategy?

Post by Buck Beach »

Your and other AI player's set up times are of no importance as opposed to the lack of honesty perceived by Matrix of the PBEM crowd. They (Matrix) insist game integrity must be preserved at all costs.

Sorry I couldn't help being sarcastic as the inability to Edit on going save games is my pet peeve with the game.

Buck
Alfred
Posts: 6683
Joined: Thu Sep 28, 2006 7:56 am

RE: When does the AI pick its strategy?

Post by Alfred »

AE is bought overwhelmingly by purchasers who will only play the AI.  Very few of those purchasers ever post on the forum.  From a commercial POV, Matrix would probably do better if it just concentrated on that market niche and paid no attention to PBEM.  Then you could have human editing of on going saved games.  But the fact is that PBEM is also catered for and there is therefore no option but an absolute need to prevent human cheating.  One also needs to remember that AE was coded before the use of Matrix servers to store PBEM game came into existence.
 
Alfred
PaulWRoberts
Posts: 905
Joined: Sun Apr 22, 2001 8:00 am

RE: When does the AI pick its strategy?

Post by PaulWRoberts »

Thanks for the information, all.
PaulWRoberts
Posts: 905
Joined: Sun Apr 22, 2001 8:00 am

RE: When does the AI pick its strategy?

Post by PaulWRoberts »

ORIGINAL: wdolson

Actually the AI script is not chosen on the running of the first turn. It is chosen when you select and start the scenario. You will lose your first turn if you restart to get another AI script.

Sorry, it's the way things shake out. Since it's a very long game, you could hold off doing a lot of your initial stuff for a couple of days of game time.

Bill

Just speculating here:

What would happen if you randomly renumbered all of the AI files for the scenario before running your saved first turn? Would this result in a different AI plan every time you started from that save? Would it break anything?
User avatar
wdolson
Posts: 7690
Joined: Tue Jun 27, 2006 9:56 pm
Location: Near Portland, OR

RE: When does the AI pick its strategy?

Post by wdolson »

ORIGINAL: Alfred

AE is bought overwhelmingly by purchasers who will only play the AI.  Very few of those purchasers ever post on the forum.  From a commercial POV, Matrix would probably do better if it just concentrated on that market niche and paid no attention to PBEM.  Then you could have human editing of on going saved games.  But the fact is that PBEM is also catered for and there is therefore no option but an absolute need to prevent human cheating.  One also needs to remember that AE was coded before the use of Matrix servers to store PBEM game came into existence.

Alfred

Of course very few games allow you to edit saved game files. Though someone who has some hacking skills and some patience can often figure out enough to hack most games. It was deliberately made very difficult to hack saved games in AE to support PBEM play. Though the majority of AE players are against the AI, the forum is dominated by PBEM players and they are very vocal.

Bill
WIS Development Team
Alfred
Posts: 6683
Joined: Thu Sep 28, 2006 7:56 am

RE: When does the AI pick its strategy?

Post by Alfred »

The script is selected once only.
 
What is so difficult to comprehend.  You cannot achieve what you want to do.  Many players spend days, not a mere 7-8 hours, on their first move.  They also spend significant time subsequently on each turn.  Others spend a lot less time if they do not mind letting go of the micromanagement.
 
If this is difficult for you then really this game is not for you.  You should not waste any more time with it. as other, much more complicated issues will soon arise.
 
Alfred
User avatar
wdolson
Posts: 7690
Joined: Tue Jun 27, 2006 9:56 pm
Location: Near Portland, OR

RE: When does the AI pick its strategy?

Post by wdolson »

ORIGINAL: wdolson

Actually the AI script is not chosen on the running of the first turn. It is chosen when you select and start the scenario. You will lose your first turn if you restart to get another AI script.

Sorry, it's the way things shake out. Since it's a very long game, you could hold off doing a lot of your initial stuff for a couple of days of game time.

Bill
ORIGINAL: Paul Roberts
Just speculating here:

What would happen if you randomly renumbered all of the AI files for the scenario before running your saved first turn? Would this result in a different AI plan every time you started from that save? Would it break anything?

Interesting idea. I'm not sure what it would do. It might crash the game, but on the other hand it might work. If you want to experiment with that idea, you could clone the entire game install to a new folder, then experiment there. The worst thing that will happen is the EXE will crash. It won't damage anything, especially if everything is done in another folder which can just be deleted if it proves to be unworkable.

Bill
WIS Development Team
User avatar
wdolson
Posts: 7690
Joined: Tue Jun 27, 2006 9:56 pm
Location: Near Portland, OR

RE: When does the AI pick its strategy?

Post by wdolson »

ORIGINAL: Alfred

The script is selected once only.

What is so difficult to comprehend.  You cannot achieve what you want to do.  Many players spend days, not a mere 7-8 hours, on their first move.  They also spend significant time subsequently on each turn.  Others spend a lot less time if they do not mind letting go of the micromanagement.

If this is difficult for you then really this game is not for you.  You should not waste any more time with it. as other, much more complicated issues will soon arise.

Alfred

I haven't checked to see if the AI script is saved in the save file. It may or may not. If it is saved in the save file, then changing the script numbering after starting the game will have no effect (the game will only look at the separate script file once at start and will refer to its own copy from then on).

Bill
WIS Development Team
Post Reply

Return to “Scenario Design and Modding”