AI (another master thread request)

This new stand alone release based on the legendary War in the Pacific from 2 by 3 Games adds significant improvements and changes to enhance game play, improve realism, and increase historical accuracy. With dozens of new features, new art, and engine improvements, War in the Pacific: Admiral's Edition brings you the most realistic and immersive WWII Pacific Theater wargame ever!

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

User avatar
Kull
Posts: 2744
Joined: Tue Jul 03, 2007 3:43 am
Location: El Paso, TX

AI (another master thread request)

Post by Kull »

ORIGINAL: jwilkerson

But be aware ... it takes Matrix at least 30-90 days AFTER a game goes GOLD before it will be released ... so when you see the GOLD announcement ... you will know release will be soon ... until the GOLD announcement release is at least 2-3 months out. We are cranking hard ... but our major surgery to the AI has pushed out our internal timeframe to go GOLD ... and once we get the new AI working it will require testing ... so it will be a while before we go GOLD ... but still more than hopeful for this year.

The usual caveat is that I'd rather you work on the problem than talk about it, but given that the team's current activity is largely (or entirely) AI-focused, why not create a master thread for this subject (akin to the "Admiral's Edition Map Thread" et al). As it stands now, one has to hunt all over the place for little snippets of information on what the AI will do, should do, or might do, and as a result, you are definitely asked the same questions again and again and again.

That said, here's another request for another set of snippets. Discussions of AI in the past tended to focus on the "scripted nature" of the AI. However, that ignores the obvious fact that a much deeper level of AI exists - the one that allows the AI to run production and perform searches and know how to respond to an air attack, etc. I guess the analogy would be that of the human brain, in which base level activities like breathing are handled by the brainstem, whereas true cognition is a feature of the cerebrum. So the question is, how much time and energy are you expending on the brain stem AI versus the cerebrum AI (scripting), and where is the "major surgery" taking place? Also, does the goal of making the AI "user configurable" apply to both sections of the "brain", or just the script piece? As for the scripting, can it handle "if/then" routines (some kind of event driven branching), or is it purely linear?
Flying Tiger
Posts: 496
Joined: Mon Mar 10, 2008 11:45 pm
Location: ummmm... i HATE that question!

RE: AI (another master thread request)

Post by Flying Tiger »

GREAT questions. Looking forward to the answers....
User avatar
treespider
Posts: 5781
Joined: Sun Jan 30, 2005 7:34 am
Location: Edgewater, MD

RE: AI (another master thread request)

Post by treespider »

ORIGINAL: Kull
ORIGINAL: jwilkerson

But be aware ... it takes Matrix at least 30-90 days AFTER a game goes GOLD before it will be released ... so when you see the GOLD announcement ... you will know release will be soon ... until the GOLD announcement release is at least 2-3 months out. We are cranking hard ... but our major surgery to the AI has pushed out our internal timeframe to go GOLD ... and once we get the new AI working it will require testing ... so it will be a while before we go GOLD ... but still more than hopeful for this year.

The usual caveat is that I'd rather you work on the problem than talk about it, but given that the team's current activity is largely (or entirely) AI-focused, why not create a master thread for this subject (akin to the "Admiral's Edition Map Thread" et al). As it stands now, one has to hunt all over the place for little snippets of information on what the AI will do, should do, or might do, and as a result, you are definitely asked the same questions again and again and again.

That said, here's another request for another set of snippets. Discussions of AI in the past tended to focus on the "scripted nature" of the AI. However, that ignores the obvious fact that a much deeper level of AI exists - the one that allows the AI to run production and perform searches and know how to respond to an air attack, etc. I guess the analogy would be that of the human brain, in which base level activities like breathing are handled by the brainstem, whereas true cognition is a feature of the cerebrum. So the question is, how much time and energy are you expending on the brain stem AI versus the cerebrum AI (scripting), and where is the "major surgery" taking place?

I don't have the details but for the most part its in the cerebrum...trying to get the various scripts (synapse chains) to fire.

Also, does the goal of making the AI "user configurable" apply to both sections of the "brain", or just the script piece?

Just the script.
As for the scripting, can it handle "if/then" routines (some kind of event driven branching), or is it purely linear?

There are numerous different scripts. - each script is essentially a lists of bases in a particular order and a list of units assigned to seize/defend those bases. Some of the scripts require certain pre-conditions to be met before they fire...the pre-conditions however are not editable. What is editable are the list of bases and the list of units.
Here's a link to:
Treespider's Grand Campaign of DBB

"It is not the critic who counts, .... The credit belongs to the man who is actually in the arena..." T. Roosevelt, Paris, 1910
User avatar
Kull
Posts: 2744
Joined: Tue Jul 03, 2007 3:43 am
Location: El Paso, TX

RE: AI (another master thread request)

Post by Kull »

Thanks for the responses. I'm still very curious about the brainstem AI, and how you are altering it to handle the new AE functionality. Let's look at just a few examples:

Submarine Patrols: The idea of using waypoints to establish submarine patrol zones is fantastic. But how does the AI "know" how to use them? I have no idea how the internal AI assigns priorities to subs, but does it now have the ability to send a sub to point "x" and then give it a patrol zone?

Pilot Experience: Under the old system, this was a simple linear equation. Any mission raised experience. But now there are different kinds of experience (ASW, air-to-air, land bombing, etc.) What if anything was done to the brainstem AI to make it cognizant of this new functionality?

Land Unit modes: There are now a host of options here, none of which previously existed. Does the brainstem AI know how to rest a unit to improve morale? Is there a decision algorithm that allows it to use the new railway travel mechanism? Information on how the AI was altered to use this new functionality would be much appreciated.

These are just a few examples, but clearly AE has a great deal of new functionality, and much is obviously not controllable via scripting. So it seems there MUST have been some delving down into the brainstem, and this is a source of great interest to me (and probably others).
User avatar
TheElf
Posts: 2800
Joined: Wed May 14, 2003 1:46 am
Location: Pax River, MD

RE: AI (another master thread request)

Post by TheElf »

ORIGINAL: Kull

Thanks for the responses. I'm still very curious about the brainstem AI, and how you are altering it to handle the new AE functionality. Let's look at just a few examples:

Submarine Patrols: The idea of using waypoints to establish submarine patrol zones is fantastic. But how does the AI "know" how to use them? I have no idea how the internal AI assigns priorities to subs, but does it now have the ability to send a sub to point "x" and then give it a patrol zone?

Pilot Experience: Under the old system, this was a simple linear equation. Any mission raised experience. But now there are different kinds of experience (ASW, air-to-air, land bombing, etc.) What if anything was done to the brainstem AI to make it cognizant of this new functionality?

Land Unit modes: There are now a host of options here, none of which previously existed. Does the brainstem AI know how to rest a unit to improve morale? Is there a decision algorithm that allows it to use the new railway travel mechanism? Information on how the AI was altered to use this new functionality would be much appreciated.

These are just a few examples, but clearly AE has a great deal of new functionality, and much is obviously not controllable via scripting. So it seems there MUST have been some delving down into the brainstem, and this is a source of great interest to me (and probably others).
I am not an AI expert. What has been a challenge to this point and the 1st question asked is "How will the AI handle this?", when discussing new features. So if you can imagine all the new features we've added need to be accounted for in the AI. It's a big job, one I am happy to be unqualified for.
IN PERPETUUM SINGULARIS SEDES

Image
User avatar
Kull
Posts: 2744
Joined: Tue Jul 03, 2007 3:43 am
Location: El Paso, TX

RE: AI (another master thread request)

Post by Kull »

ORIGINAL: TheElf

I am not an AI expert. What has been a challenge to this point and the 1st question asked is "How will the AI handle this?", when discussing new features. So if you can imagine all the new features we've added need to be accounted for in the AI. It's a big job, one I am happy to be unqualified for.

That is certainly comforting to know! Out of curiousity, who are the team guys with expertise in this area? Perhaps one or two could stop by and give us a some insights?
pad152
Posts: 2835
Joined: Sun Apr 23, 2000 8:00 am

RE: AI (another master thread request)

Post by pad152 »

Speaking of AI, I wonder, will it still cheat (knowing where all the players forces are and where their going [8|]) as much at the hardest player level?





User avatar
jeffk3510
Posts: 4143
Joined: Mon Dec 03, 2007 5:59 am
Location: Kansas

RE: AI (another master thread request)

Post by jeffk3510 »

Counter it... turn off FOW and you will know where their forces are and where they are going.... greatest invention to video games :)
Life is tough. The sooner you realize that, the easier it will be.
User avatar
jwilkerson
Posts: 8272
Joined: Sun Sep 15, 2002 4:02 am
Location: Kansas
Contact:

RE: AI (another master thread request)

Post by jwilkerson »

When we say "AI" without further qualification, we are usually talking about that part of the AI that will be exposed in the editor. I might call this the "strategic AI". This is the AI that drives the campaigns. Specifically which airgroups and land units are going where to do what when. The concept of this AI is that the navy is in a supporting role and can be called upon to transport troops, escort them, provide surface and bombardment and even carrier support.

But there are many many other parts of the code or places in the code where we do things differently if "player=COMPUTER" ... and there are many routines that are specially designed for "player=COMPUTER" ... not sure I would call them "deep" ... but they do all the detailed stuff. I might call the totallity of this stuff the "tactical AI".

But I don't think we will discuss ad-infinitum the exact working of the AI in the code .. this would actually be counter-productive. Once makes an AI interesting is not knowing what it will do. So we want to preserve this for the players. Yes, modders will be able to change the AI by creating more scripts, but exactly how the code handles will still not be totally exposed.

This being said we have made many many changes to the tactical AI as well as the strategic AI ... and yes we have made the AI aware of the new features like LCU modes.
WITP Admiral's Edition - Project Lead
War In Spain - Project Lead
User avatar
Kull
Posts: 2744
Joined: Tue Jul 03, 2007 3:43 am
Location: El Paso, TX

RE: AI (another master thread request)

Post by Kull »

ORIGINAL: jwilkerson

When we say "AI" without further qualification, we are usually talking about that part of the AI that will be exposed in the editor. I might call this the "strategic AI". This is the AI that drives the campaigns. Specifically which airgroups and land units are going where to do what when. The concept of this AI is that the navy is in a supporting role and can be called upon to transport troops, escort them, provide surface and bombardment and even carrier support.

But there are many many other parts of the code or places in the code where we do things differently if "player=COMPUTER" ... and there are many routines that are specially designed for "player=COMPUTER" ... not sure I would call them "deep" ... but they do all the detailed stuff. I might call the totallity of this stuff the "tactical AI".

But I don't think we will discuss ad-infinitum the exact working of the AI in the code .. this would actually be counter-productive. Once makes an AI interesting is not knowing what it will do. So we want to preserve this for the players. Yes, modders will be able to change the AI by creating more scripts, but exactly how the code handles will still not be totally exposed.

This being said we have made many many changes to the tactical AI as well as the strategic AI ... and yes we have made the AI aware of the new features like LCU modes.

Joe, thanks for the solid response - I like the terms tactical and strategic AI, that's spot-on. As for the decision to "keep the covers on", well, on one hand I really like poking my head around inside the engine, but I can fully appreciate that it makes for a better game when the human isn't quite sure what will trigger any given AI response. And it's a great relief to know that new functionality isn't just grafted onto the old engine, but comes with the internal code changes that will make it an effective part of the new game.

That said, your earlier comments (quoted in the first post and somewhat confirmed by Treespider) refer to "major surgery" on the "AI" (without further qualification), so it seems very clear you guys are wielding scalpels to the Strategic AI. Maybe this is just wishful thinking, but "script rewrites" don't strike me as being major surgey. Painstakingly detailed work, yes, but surgery, no. So harkening back to another of treespider's comments, is it perhaps the list of preconditions that cause the scripts to "trigger"? Possibly you are adding a host of new ones, perhaps as a substitute for the lack of true "if/then" script branching?

Even if I'm barking up the wrong tree with those assumptions, I would like to know why the script preconditions couldn't be surfaced as something editable (which treespider indicates they are not). It seems that would be a very desirable thing for the modders out here. Perhaps you could shed some light on that, maybe even providing an example of the kinds of preconditions that would trigger a script?
User avatar
jwilkerson
Posts: 8272
Joined: Sun Sep 15, 2002 4:02 am
Location: Kansas
Contact:

RE: AI (another master thread request)

Post by jwilkerson »

Well. what you are calling "script preconditions" will be exposed in the AI - so talking about that is ok. Basically we are implementing a kind of "Forest" structure (no relation to our very own Forest :) ... a Forest in this sense - being a collection of trees. A "root node" of a tree in this forest is triggered by a start date, and subsequent nodes in a tree are triggered by successor relationships. A node in this tree we call a script, though actually it is pretty much what we were calling a script before - and it might more properly be called a "module". But this includes lists of attacking units, target bases, and defending units, and several other attributes.

The impetus for this idea is actually a desire I have one day to implement a true "Petri Net inspired" control mechanism for an AI. What we've done to date is a weak version of same, but it does leverage the basic idea.


WITP Admiral's Edition - Project Lead
War In Spain - Project Lead
User avatar
Kull
Posts: 2744
Joined: Tue Jul 03, 2007 3:43 am
Location: El Paso, TX

RE: AI (another master thread request)

Post by Kull »

ORIGINAL: jwilkerson

Well. what you are calling "script preconditions" will be exposed in the AI - so talking about that is ok. Basically we are implementing a kind of "Forest" structure (no relation to our very own Forest :) ... a Forest in this sense - being a collection of trees. A "root node" of a tree in this forest is triggered by a start date, and subsequent nodes in a tree are triggered by successor relationships. A node in this tree we call a script, though actually it is pretty much what we were calling a script before - and it might more properly be called a "module". But this includes lists of attacking units, target bases, and defending units, and several other attributes.

The impetus for this idea is actually a desire I have one day to implement a true "Petri Net inspired" control mechanism for an AI. What we've done to date is a weak version of same, but it does leverage the basic idea.

Thanks Joe, you made my year! It sounds like the new Strategic AI system is going to offer modders a great deal more flexibility than a surfacing of the old linear system. And more than just modders, this will make the base game a whole lot more interesting. Congratulations to you and the whole team on making the difficult decision to perform "major surgery" on the AI. I for one am extremely grateful (and there's an excellent chance that many, many others will feel the same way)!
rubisco
Posts: 179
Joined: Mon Aug 06, 2007 5:37 pm

RE: AI (another master thread request)

Post by rubisco »

ORIGINAL: jwilkerson

Well. what you are calling "script preconditions" will be exposed in the AI - so talking about that is ok. Basically we are implementing a kind of "Forest" structure (no relation to our very own Forest :) ... a Forest in this sense - being a collection of trees. A "root node" of a tree in this forest is triggered by a start date, and subsequent nodes in a tree are triggered by successor relationships. A node in this tree we call a script, though actually it is pretty much what we were calling a script before - and it might more properly be called a "module". But this includes lists of attacking units, target bases, and defending units, and several other attributes.

Will the triggers for the scripts include bases changing hands?

So, for example, would it be possible to set a trigger, for the Allied AI, of the Japanese player capturing Pearl Harbour?
User avatar
treespider
Posts: 5781
Joined: Sun Jan 30, 2005 7:34 am
Location: Edgewater, MD

RE: AI (another master thread request)

Post by treespider »

ORIGINAL: rubisco

ORIGINAL: jwilkerson

Well. what you are calling "script preconditions" will be exposed in the AI - so talking about that is ok. Basically we are implementing a kind of "Forest" structure (no relation to our very own Forest :) ... a Forest in this sense - being a collection of trees. A "root node" of a tree in this forest is triggered by a start date, and subsequent nodes in a tree are triggered by successor relationships. A node in this tree we call a script, though actually it is pretty much what we were calling a script before - and it might more properly be called a "module". But this includes lists of attacking units, target bases, and defending units, and several other attributes.

Will the triggers for the scripts include bases changing hands?

So, for example, would it be possible to set a trigger, for the Allied AI, of the Japanese player capturing Pearl Harbour?


Joe or Andy can answer better - but IIRC the triggers can not be set by the player. However Joe indicates the triggers are exposed...ie this "script" or "module" will fire when this specific event occurs.
Here's a link to:
Treespider's Grand Campaign of DBB

"It is not the critic who counts, .... The credit belongs to the man who is actually in the arena..." T. Roosevelt, Paris, 1910
User avatar
jwilkerson
Posts: 8272
Joined: Sun Sep 15, 2002 4:02 am
Location: Kansas
Contact:

RE: AI (another master thread request)

Post by jwilkerson »

There are two types of triggers in the new AI processor, date based and precessor completion. Predecessor completion means all objectives in the predecessor script have been captured. So if you made a script with one objective base, and that base was captured, that would end that script and start the successor script.

WITP Admiral's Edition - Project Lead
War In Spain - Project Lead
User avatar
treespider
Posts: 5781
Joined: Sun Jan 30, 2005 7:34 am
Location: Edgewater, MD

RE: AI (another master thread request)

Post by treespider »

ORIGINAL: jwilkerson

There are two types of triggers in the new AI processor, date based and precessor completion. Predecessor completion means all objectives in the predecessor script have been captured. So if you made a script with one objective base, and that base was captured, that would end that script and start the successor script.



However for clarification (I think I already know the answer but for the benefit of others...)

1. Can you tell a script which script is its preedecessor?

For example - can the modder enter data which tells script B that its predecessor is script C instead of script A? Or will Script A always be Script B's predecessor.


2. Can the modder assign the date trigger or is it preset in the code?
Here's a link to:
Treespider's Grand Campaign of DBB

"It is not the critic who counts, .... The credit belongs to the man who is actually in the arena..." T. Roosevelt, Paris, 1910
User avatar
jwilkerson
Posts: 8272
Joined: Sun Sep 15, 2002 4:02 am
Location: Kansas
Contact:

RE: AI (another master thread request)

Post by jwilkerson »

ORIGINAL: treespider

1. Can you tell a script which script is its preedecessor?

Yes.
For example - can the modder enter data which tells script B that its predecessor is script C instead of script A? Or will Script A always be Script B's predecessor.
The modder defines all predecessor triggers.
2. Can the modder assign the date trigger or is it preset in the code?

The modder defines all date triggers.
WITP Admiral's Edition - Project Lead
War In Spain - Project Lead
JamesM
Posts: 1026
Joined: Mon Aug 28, 2000 8:00 am
Location: QLD, Australia

RE: AI (another master thread request)

Post by JamesM »

Very interesting discussion and as a person that only play against the AI I thank you for your hard work and patience in improving the AI.
User avatar
BeastieDog
Posts: 96
Joined: Fri Dec 22, 2006 3:23 pm

RE: AI (another master thread request)

Post by BeastieDog »

Ditto. I'm unable to commit to a PBEM and looking forward to a challenging AI. Thanks for your efforts on AI.
Dog
pad152
Posts: 2835
Joined: Sun Apr 23, 2000 8:00 am

RE: AI (another master thread request)

Post by pad152 »

Can the player set a trigger/script to do an evacuation (troops, aircraft, ships in port)?
Post Reply

Return to “War in the Pacific: Admiral's Edition”