Intelligence variable for NPC

An area for discussing new ideas and additions to Oolite.

Moderators: winston, another_commander

Post Reply
UK_Eliter
---- E L I T E ----
---- E L I T E ----
Posts: 1248
Joined: Sat Sep 12, 2009 11:58 pm
Location: Essex (mainly industrial and occasionally anarchic)

Intelligence variable for NPC

Post by UK_Eliter »

Dear all

Perhaps someone has suggested this before. And it may be (somewhat) in the code already. Still:-

How about each NPC (non-player character, i.e. ship) having an intelligence value, set randomly within paremetres determined by such things as ship type, equipment, and legal status. The intelligence of a ship (and I am thinking particularly, perhaps, of pirates) would affect how it responded to such things as mines, cloaking, being outgunned, and having cargo dropped in its path.

I imagine that implementing this would be involved, though. But it might improve the game significantly. Just a thought. (But - to go on - once we have an intelligence value we could have other values such as hostility and even greed. .)
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8515
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Post by DaddyHoggy »

I think basically, when this has come up before, is that the current AI is quite simple and couldn't cope with this - i.e. smarter NPCs would require smarter/new programming of AI...
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

..

Post by Lestradae »

I think something like that exists - you can set an "accuracy" value for NPC ships that determines how fast & well they hit with weapons methinks.

The people in the know can agree or correct me here, at least it works that way for missiles.
User avatar
Disembodied
Jedi Spam Assassin
Jedi Spam Assassin
Posts: 6885
Joined: Thu Jul 12, 2007 10:54 pm
Location: Carter's Snort

Post by Disembodied »

I think an "accuracy" variable is fine, but any variability on the "intelligence" on the AI would be very hard to manage. There's a limit to how thin you can slice something that's very very thin to begin with!

For pirates, perhaps the most interesting variable would be "aggression", e.g. at what point in a combat might they cut and run, or how easily distracted they are by some nearby cargo canisters. I have been ignored by pirates, who preferred scooping loose cargo to attacking me (although that changed when I attacked them – I had dibs on that loose cargo first!), but don't know if many pirates would break off a fight if some cargo canisters suddenly popped into view. It would be good if they did, as it would mean that dumping a few tons of cargo might be enough to keep pirates off your back. It would be realistic, since it's the cargo they're after, and it would give players a non-violent option to escape a pirate attack. Maybe give them a % chance of moving into scoop mode per nearby canister?
UK_Eliter
---- E L I T E ----
---- E L I T E ----
Posts: 1248
Joined: Sat Sep 12, 2009 11:58 pm
Location: Essex (mainly industrial and occasionally anarchic)

Post by UK_Eliter »

Dear Disembodied

I think that pirates can already break off combat when cargo is dumped in front of them. That's something that's been implemented in trunk, I think. I haven't tested it, though.
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 »

UK_Eliter wrote:
Dear Disembodied

I think that pirates can already break off combat when cargo is dumped in front of them. That's something that's been implemented in trunk, I think. I haven't tested it, though.
Yes, every pirate is signalled about the cargo dumping in trunk. Currently the chance is set to 25% to get distracted by this. But the chance is set in the AI and everyone can make a custom AI with different chance. When fleeing for a bunch of pirates, dumping 2 pods should on average take half of the group from your tail. :lol:

Just one problem left for the player. When he starts attacking the remainders, they will get help of group members, resulting in some of the pirates you had shaken of will return their attention to you.
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2411
Joined: Mon May 31, 2010 11:11 pm

Post by Switeck »

The shot-up fleeing pirates also need a better strategy.
Straight-and-level may work if they're 10+ km away, but when they're <2 km away and I'm on their tail, they need to be turning-and-burning.
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 »

Disembodied wrote:

For pirates, perhaps the most interesting variable would be "aggression", e.g. at what point in a combat might they cut and run...
An "Aggression" factor would be really good, and the current AIs only allow for this in a small way. For example in the Pirate AI a pirate with an incoming missile will Flee, whereas a Thargoid in the same situation will turn and fight back.
To have more variety in responses would presumably require a much more complex set of rules and actions, something that Oolite, basically a lean and simple game, may not be able to support.
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

When AI's are extended by coupling them with a javascript then a lot more can be done (as JS can be more flexible and make more choices). You can do a lot more rules and possibilities there if it's written cleverly.

The problem comes with the "actions" that AIs do, mainly performAttack in terms of aggressiveness. Currently there's nothing that can be done there as it's all in trunk. But things like performFlee and performIdle can be "simulated" within JS and the action there can be adjusted.
User avatar
Disembodied
Jedi Spam Assassin
Jedi Spam Assassin
Posts: 6885
Joined: Thu Jul 12, 2007 10:54 pm
Location: Carter's Snort

Post by Disembodied »

UK_Eliter wrote:
I think that pirates can already break off combat when cargo is dumped in front of them. That's something that's been implemented in trunk, I think. I haven't tested it, though.
Excellent! 8)
Post Reply