Home » MODDING HQ 1.13 » v1.13 Coding Talk » Learning how the tactical AI works
Re: Learning how the AI works[message #275355]
|
Tue, 08 March 2011 17:47 ![Go to previous message Go to previous message](/theme/Bear_Classic_Brown/images/up.png)
|
|
JMich |
![](/images/ranks/first_sergeant.png) |
Messages:546
Registered:January 2011 Location: Greece |
|
|
// THE FOUR (4) POSSIBLE ALERT STATUSES ARE:
// GREEN - No one seen, no suspicious noise heard, go about regular duties
// YELLOW - Suspicious noise was heard personally or radioed in by buddy
// RED - Either saw opponents in person, or definite contact had been radioed
// BLACK - Currently has one or more opponents in sight How the AI reacts depends on what state the soldier is currently in. If the soldier is on green and hears a noise, he will (usually) move to investigate, if he is on yellow he has a chance (25% to 65%, depending on orders and attitude) of radioing the noise, if on red he will turn towards the noise and go prone. There is also the "Most Important Noise", which I'm not sure if it's the closest, or the loudest, or if it can tell the difference between a footstep, an explosion, a scream and a shot.
On the borg mentality, there is a chance (again depending on orders and attitudes) that if the soldier knows some enemy positions that his allies do not, he will radio the contact, but how often do we let the enemy enough time to radio in? Usually, only if there are 5+ soldiers, and we cannot kill them all in 1 turn. Same thing also explains the suppression and blind shooting (or lack of).
Finally, the movement mode of the soldiers depends once again on orders and attitude, a cunning soldier for example is more propable to move crouched than an aggressive one. Also, whenever the situation changes (enemy sighted, noise heard, better cover in view), the merc (pc/militia/soldier/civilian) has to reevaluate his/her options, and decide again whether he/she should continue or do something else. This is the reason for the back and forth, since the soldier moves around the corner, sees your pc and has no cover. Best cover is behind the corner, so he/she moves back to cover. Next turn, the soldier again has an idea of where your merc is, but no definite answer, so if he/she goes to look, the same thing will happen.
Hope this helps clarify a few things, and I will suggest you take a look at the code as well, the comments make it easy enough to understand.
Report message to a moderator
|
First Sergeant
|
|
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Learning how the tactical AI works
By: MorgluM on Tue, 22 February 2011 07:54
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: MorgluM on Tue, 22 February 2011 15:30
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: MorgluM on Tue, 22 February 2011 15:57
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: MorgluM on Tue, 22 February 2011 20:03
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: Buns on Wed, 23 February 2011 15:59
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: MorgluM on Wed, 23 February 2011 17:34
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: MorgluM on Wed, 23 February 2011 17:36
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: Buns on Wed, 23 February 2011 18:24
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: MorgluM on Wed, 23 February 2011 21:13
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: JMich on Wed, 23 February 2011 21:27
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: MorgluM on Wed, 23 February 2011 21:32
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: MorgluM on Wed, 23 February 2011 21:42
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: MorgluM on Wed, 23 February 2011 21:57
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: MorgluM on Thu, 24 February 2011 01:22
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: MorgluM on Thu, 24 February 2011 23:27
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: JMich on Thu, 24 February 2011 23:41
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: tais on Fri, 25 February 2011 00:07
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: MorgluM on Fri, 25 February 2011 06:02
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: MorgluM on Fri, 25 February 2011 06:09
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: JMich on Fri, 25 February 2011 09:05
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: MorgluM on Tue, 01 March 2011 20:08
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: Buns on Tue, 08 March 2011 17:26
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: JMich on Tue, 08 March 2011 17:47
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: Buns on Tue, 08 March 2011 19:39
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: JMich on Tue, 08 March 2011 20:13
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: Buns on Wed, 09 March 2011 14:51
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: JMich on Wed, 09 March 2011 16:05
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: Buns on Wed, 09 March 2011 17:34
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: SharkD on Sun, 20 March 2011 14:57
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: Buns on Sun, 20 March 2011 15:19
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: SharkD on Tue, 22 March 2011 03:08
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: Buns on Tue, 22 March 2011 14:53
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: MorgluM on Wed, 06 April 2011 01:45
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: JMich on Wed, 06 April 2011 10:39
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Semi-Success , and question re: working directory
By: MorgluM on Thu, 07 April 2011 15:26
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Semi-Success , and question re: working directory
By: JMich on Thu, 07 April 2011 16:29
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Semi-Success , and question re: working directory
By: MorgluM on Fri, 08 April 2011 00:46
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Semi-Success , and question re: working directory
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Semi-Success , and question re: working directory
By: MorgluM on Fri, 08 April 2011 02:28
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Semi-Success , and question re: working directory
By: MorgluM on Fri, 08 April 2011 03:06
|
Goto Forum:
Current Time: Tue Feb 11 12:45:38 GMT+2 2025
Total time taken to generate the page: 0.01860 seconds
|