AI intinct vs planning

An area for discussing new ideas and additions to Oolite.

Moderators: winston, another_commander

Post Reply
User avatar
Arexack_Heretic
Dangerous Subversive Element
Dangerous Subversive Element
Posts: 1876
Joined: Tue Jun 07, 2005 7:32 pm
Location: [%H] = Earth surface, Lattitude 52°10'58.19"N, longtitude 4°30'0.25"E.
Contact:

AI intinct vs planning

Post 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?
Riding the Rocket!
User avatar
aegidian
Master and Commander
Master and Commander
Posts: 1161
Joined: Thu May 20, 2004 10:46 pm
Location: London UK
Contact:

Post 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.
"The planet Rear is scourged by well-intentioned OXZs."

Oolite models and gear? click here!
User avatar
Rxke
Retired Assassin
Retired Assassin
Posts: 1760
Joined: Thu Aug 12, 2004 4:54 pm
Location: Belgium

Post 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)
User avatar
aegidian
Master and Commander
Master and Commander
Posts: 1161
Joined: Thu May 20, 2004 10:46 pm
Location: London UK
Contact:

Memory?

Post by aegidian »

No, but they should be capable of better judging the opposition and running away sooner.
"The planet Rear is scourged by well-intentioned OXZs."

Oolite models and gear? click here!
User avatar
Cholmondely
Archivist
Archivist
Posts: 5364
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: AI intinct vs planning

Post 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?
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
aegidian
Master and Commander
Master and Commander
Posts: 1161
Joined: Thu May 20, 2004 10:46 pm
Location: London UK
Contact:

Re: AI intinct vs planning

Post by aegidian »

Sorry, I'm drawing a blank here too.
"The planet Rear is scourged by well-intentioned OXZs."

Oolite models and gear? click here!
Post Reply