Page 1 of 1

AI intinct vs planning

Posted: Wed Aug 09, 2006 8:44 am
by Arexack_Heretic
I'm wondering if Giles would like to 'lift a piece of the vail'
(is that just a Dutch proverb?) about instincts?

(eg. Enlighten us somewhat please.) :D

As I understand it, pilot-instinctAI will override plannedAI, when certain stressfull conditions are met and return controll to the plannedAI when it is safe again.

For example being too close to a planet.
So a ship wants to go someplace, it comes too close to the planet. Instict kicks in and it moves away, when it's at safe distnce, planning sends it back on the same course. Round and round we go...like a dancing mosquito.

Do you have a plan for preventing such loops? :?

Maybe you would increase frustration-level each time instinct has to take over and once a threshold is reached switch to another AI?

Posted: Wed Aug 09, 2006 10:47 am
by aegidian
It won't work quite like that.

Each pilot controlling a ship will have a number of instincts - each with a separate priority.

Each instinct will be considered every-so-often against the pilot's perception of the space around him, and will return a value relating to the 'urgency' of that instinct.

The instinct with the highest urgency and priority will determine the behaviour of the pilot in controlling the ship.

AI's as written will continue as a particular sort of instinct - effectively a 'plan' the pilot is following. Other instincts may override it from time to time. Like (for example) the instinct to eject if ship energy levels are low and falling rapidly.

Loops will occur, but with the variety of space, most will not be infinite (if any at all).

Interestingly the exact behaviour you describe is used by the way-point setting AI routines for navigating around planets and other hazards. The reason that doesn't loop infinitely is that the two courses taken are never on exactly opposite paths.

Posted: Wed Aug 09, 2006 11:06 am
by Rxke
Will NPC's have a 'memory'?

ie: if you laser the crap out of an opponent and he flees, when you later on in the game happen to encounter it again, will it remember you're too strong an opponent and chicken out?

(instead of suicidally attacking once again)

Memory?

Posted: Wed Aug 09, 2006 1:58 pm
by aegidian
No, but they should be capable of better judging the opposition and running away sooner.

Re: AI intinct vs planning

Posted: Wed Jul 24, 2024 1:41 pm
by Cholmondely
Arexack_Heretic wrote: Wed Aug 09, 2006 8:44 am
Maybe you would increase frustration-level each time instinct has to take over and once a threshold is reached switch to another AI?
Thy eminence!

5 months before you wrote this, you added 2 links (to a wiki page to be called "Frustration") on the OXP howto AI wiki page (23rd January 2006).

I can't find anything anywhere about this. The concept comes up several times in the wiki, with no real explanation, and the vanilla game code mentions it repeatedly in the ShipEntity.m & ShipEntityAI.m files. There seems to be no earlier mention about it here in the BB either (lost in the Great Deletion?).

Any chance of some sort of explanation?

Re: AI intinct vs planning

Posted: Wed Jul 24, 2024 4:35 pm
by aegidian
Sorry, I'm drawing a blank here too.