Join us at the Oolite Anniversary Party -- London, 7th July 2024, 1pm
More details in this thread.

How does AI work in Oolite?

General discussion for players of Oolite.

Moderators: winston, another_commander

User avatar
shodex
Poor
Poor
Posts: 5
Joined: Thu Aug 05, 2010 6:41 pm

How does AI work in Oolite?

Post by shodex »

I've been playing for a while, but I never really figured this out, how does the AI work in Oolite? Do all the ships wander aimlessly until the player interacts, or do they all have a scheduled Alife system?

This was just out of curiosity, thanks in advance for the reply.
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Post by Smivs »

Yes, put simply they all have various 'standard roles' which they follow until they're interacted with. For example a Trader will often just slowly make its way from the witchpoint to the station and then dock.
When another vessel (including you) interacts with them, they follow a pre-defined set of actions depending on the nature of the interaction.
Oh, and welcome to the forum, reputedly the friendliest this side of Ridquat.
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
shodex
Poor
Poor
Posts: 5
Joined: Thu Aug 05, 2010 6:41 pm

Post by shodex »

Thanks! So, does the AI continue doing it's thing even when I'm not there? Or is it just in a frozen state until I'm within range to know whats happening.
User avatar
Loxley
Deadly
Deadly
Posts: 148
Joined: Sat Jan 30, 2010 7:44 pm
Location: Chatham, England

Post by Loxley »

The whole system runs whether you choose to interact with it or not.
Miners mine, traders fly to the main station and pirates prey on them whether you see it or not.

Awesome isn't it?
"There is still much music to be written in C major" Stravinsky
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

Hi, shodex, and first of all welcome to the boards, and of course to this great game! :D

One of the beauties of Oolite (and one of the points that make it superior to the original Elite) is that it is not player-centred. This means that the whole Oonivese around you (well, your current system, to be precise) is completely alive around you, even if you don't look.

So yes, together with you there are some 30–50 other ships (it depends on where you are, and also on which OXPs you have installed) in the system, and every last one of them is going after their own business all the time: traders slowly approach the planet and later the station, exiting traders leave the station and vanish into witchspace, pirates are lurking somewhere in-system and attack any passing traders, bounty hunters and police patrol the major space lanes and intervene if a trader is attacked by pirates, escorts help their mothers to defend themselves or to attack, miners slowly blast asteroids to bits and collect the debris, and the occasional thargoid simply attacks everything in its way.

You as the player are moving through this scenery and may interact with every one of them, but even if you choose not to interact at all but simply watch, the NPCs will continue to do their business. That's the reason why you sometimes may help a trader against a bunch of pirates, because the pirates already have attacked him when you were nowhere near the place. Or at other times you will find cargo containers floating in space, telling the tale of a battle that ended long before you approached. And often you see laser beams flashing in the distance. That's where the action is, regardless where you are in the system.

In one word: it is alive!
User avatar
shodex
Poor
Poor
Posts: 5
Joined: Thu Aug 05, 2010 6:41 pm

Post by shodex »

Ooh, thats exactly how I hoped it would be. :D Thanks for all the quick replies.
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8512
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Post by DaddyHoggy »

There is, I think, one exception, to this non-player-centric rule, Thargoids will target the player first, in preference to any other targets.
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
User avatar
maik
Wiki Wizard
Wiki Wizard
Posts: 2022
Joined: Wed Mar 10, 2010 12:30 pm
Location: Ljubljana, Slovenia (mainly industrial, feudal, TL12)

Post by maik »

DaddyHoggy wrote:
There is, I think, one exception, to this non-player-centric rule, Thargoids will target the player first, in preference to any other targets.
I'm not so sure. I think that when I stumble upon some Thargoids that are already engaged in a fight with another trader they don't interrupt it to go after me until I start shooting them.
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8512
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Post by DaddyHoggy »

maik wrote:
DaddyHoggy wrote:
There is, I think, one exception, to this non-player-centric rule, Thargoids will target the player first, in preference to any other targets.
I'm not so sure. I think that when I stumble upon some Thargoids that are already engaged in a fight with another trader they don't interrupt it to go after me until I start shooting them.
I point you at Ahruman's post in this thread... :wink: https://bb.oolite.space/viewtopic.ph ... 308714c2ca
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
User avatar
maik
Wiki Wizard
Wiki Wizard
Posts: 2022
Joined: Wed Mar 10, 2010 12:30 pm
Location: Ljubljana, Slovenia (mainly industrial, feudal, TL12)

Post by maik »

DaddyHoggy wrote:
maik wrote:
DaddyHoggy wrote:
There is, I think, one exception, to this non-player-centric rule, Thargoids will target the player first, in preference to any other targets.
I'm not so sure. I think that when I stumble upon some Thargoids that are already engaged in a fight with another trader they don't interrupt it to go after me until I start shooting them.
I point you at Ahruman's post in this thread... :wink: https://bb.oolite.space/viewtopic.ph ... 308714c2ca
Ok.... Of course I wouldn't doubt the words of our supreme master and commander. ;-) Could it be though that e.g. the galactic navy OXP changes that? If there is a battle going on with hoards of Thargoids and fleets of Navy vessels, wouldn't that imply that all the Thargoids attack me when I enter the furball? This is not what happens.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

maik wrote:
DaddyHoggy wrote:
There is, I think, one exception, to this non-player-centric rule, Thargoids will target the player first, in preference to any other targets.
I'm not so sure. I think that when I stumble upon some Thargoids that are already engaged in a fight with another trader they don't interrupt it to go after me until I start shooting them.
This still means they prefer the player in their initial search. The same is valid for pirates. When they search for victims and the player is in scanner range, they go for the player.

But, after a target is selected, they start combat and won't look at new ships that enter their scanner, unless that ship is attacking them.

Apart from these two examples, the player has no special role over npc ships I think. And when you enable docking clearance, you have to wait in line for docking like all other ships. The main station has a fast docking option that skips the queue, but at other stations it can take a while sometimes until your turn comes up.
User avatar
aegidian
Master and Commander
Master and Commander
Posts: 1160
Joined: Thu May 20, 2004 10:46 pm
Location: London UK
Contact:

Post by aegidian »

Eric Walch wrote:
This still means they prefer the player in their initial search. The same is valid for pirates. When they search for victims and the player is in scanner range, they go for the player.
If I recall correctly pirates are a bit smarter than that since they should also take into account how many ships they have as allies relative to those of their prospective victim. Which does naturally de-favour the single player.
"The planet Rear is scourged by well-intentioned OXZs."

Oolite models and gear? click here!
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Post by Smivs »

From the Pirate AI

Code: Select all

"ODDS_GOOD" = (groupAttackTarget); 
"ODDS_LEVEL" = (groupAttackTarget); 
"GROUP_ATTACK_TARGET" = (setTargetToFoundTarget, "setStateTo: ATTACK_SHIP"); 
suggesting that the pirates will weigh up the odds before attacking. There is not an "Odds_Poor", so presumably this defaults to a 'Don't attack'. I can't envisage a situation where a band of pirates would have poor odds, though. Perhaps a phalanx of Vipers?
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

Smivs wrote:
From the Pirate AI

Code: Select all

"ODDS_GOOD" = (groupAttackTarget); 
"ODDS_LEVEL" = (groupAttackTarget); 
"GROUP_ATTACK_TARGET" = (setTargetToFoundTarget, "setStateTo: ATTACK_SHIP"); 
suggesting that the pirates will weigh up the odds before attacking. There is not an "Odds_Poor", so presumably this defaults to a 'Don't attack'. I can't envisage a situation where a band of pirates would have poor odds, though. Perhaps a phalanx of Vipers?
The AI-message is actually called "ODDS_BAD", and you are right, if the odds are calculated as bad, the pirate won't attack. Instead he will simply reach the "UPDATE"-message and begin another scan. If you would enter a response to the "ODDS_BAD"-message, the pirate would do exactly as you tell him (for instance "ODDS_BAD" = ("sendCommsMessage: Darn, I give up!", "switchAITo: dumbAI.plist"); ).
DaddyHoggy wrote:
There is, I think, one exception, to this non-player-centric rule, Thargoids will target the player first, in preference to any other targets.
As the other guys pointed out, this is something different entirely. Thargoids (as well as pirates) will favour the player if they search for a new target and he is in their scanner range. But of course they will attack something else if he is not in reach. They won't wait just for him doing nothing while they wait. That's the non-player-centredness.
User avatar
Cmdr Wyvern
---- E L I T E ----
---- E L I T E ----
Posts: 1649
Joined: Tue Apr 11, 2006 1:47 am
Location: Somewhere in the great starry void

Post by Cmdr Wyvern »

I think the pirate AI could be a little smarter in judging bad odds, even in the middle of an attack run.

Like say, the pirate gang attacks an aggressive, iron-assed player, the player opens a can of military grade whupass, and the pirates see two or three or their crewmates get blasted to dust in a few seconds.
At that point, it should look to them that the odds positively suck; it's time for the surviving crooks to break off and leave that guy alone.

But as we all know, pirate NPCs aren't that smart. They press the assault and get blown to kingdom come, or decide to run away when they've taken damage.

Thargoids, on the other hand, I'd expect to see fight madly till the last Bug gets swatted, and that pretty much happens.
Running Oolite buttery smooth & rock stable w/ tons of eyecandy oxps on:
ASUS Prime X370-A
Ryzen 5 1500X
16GB DDR4 3200MHZ
128GB NVMe M.2 SSD (Boot drive)
1TB Hybrid HDD (For software and games)
EVGA GTX-1070 SC
1080P Samsung large screen monitor
Post Reply