The grand memory gobbler

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

User avatar
aegidian
Master and Commander
Master and Commander
Posts: 1161
Joined: Thu May 20, 2004 10:46 pm
Location: London UK
Contact:

OH BOY!

Post by aegidian »

Oops! I just spotted a possible infinite looper in the AI implementation.

The AI uses setState:@"GLOBAL" immediately after changing AI, which messages "EXIT" to the previous state and then "ENTER" to the new state. If the new AI shares a state name with the new AI then the new AI is considered to be in that state when it gets the "EXIT" message - which may in turn cause another change in AI - possibly looping infinitely.

I'm not sure if this is the specific cause of the current lock-ups but it looks like a likely candidate. I'm just going through the AI code now, to remove this possible unexpected behaviour in future.
"The planet Rear is scourged by well-intentioned OXZs."

Oolite models and gear? click here!
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:

Post by Arexack_Heretic »

A state name like FLEE? :shock:

I thought a new AI were supposed to always start in GLOBAL.
Riding the Rocket!
User avatar
TedJ
Deadly
Deadly
Posts: 131
Joined: Tue Jan 17, 2006 3:18 am
Location: Melbourne, Australia

Post by TedJ »

Well, I've not come across the gobbler since updating my AI plists but I still see some downright weird AI behaviour. Anyone else here seen a Galcop Viper doing loop-de-loops after a battle? What's amusing for a Viper is annoying with a Behemoth, and downright frightening when you're trying to dock with it...
User avatar
Rxke
Retired Assassin
Retired Assassin
Posts: 1760
Joined: Thu Aug 12, 2004 4:54 pm
Location: Belgium

Post by Rxke »

Yip, Giles explained what happened.... Here:
PostPosted: Wed Jan 18, 2006 2:54 pm
I think this is down to the Behemoth targeting a Thargon and, when the Thargons go uncontrolled, continuing to try to engage it.

This blocks the Behemoth from reacting to docking requests, and hence both you and all the Navy ships have to wait idly by.

I've been looking at the problem (last time a few weks ago) - I guess I need to look again.
Confused
Next time, try pausing the game and pressing '0' (zero), this'll dump a list of entities and their AI states to the console. Then email me the output - it may help.

(Edit:) With GalCops, probably similar: chasing a baddie, and it ejects, so ship becomes uncontrolled entity, AI confused etc...
User avatar
TedJ
Deadly
Deadly
Posts: 131
Joined: Tue Jan 17, 2006 3:18 am
Location: Melbourne, Australia

Post by TedJ »

No, the Behemoth will acknowledge docking requests... It just wont stop performing loops to facilitate it.

I have managed to dock with a Behemoth doing this only once, by performing the same loop-de-loop in front of it and letting it catch up. I consider it my finest piloting moment, although it did almost cost me my keyboard. ;)
User avatar
Rxke
Retired Assassin
Retired Assassin
Posts: 1760
Joined: Thu Aug 12, 2004 4:54 pm
Location: Belgium

Post by Rxke »

Yes, I forgot to mention that, probably AI routines clashing? The Docking AI puts you on hold, every time...
Post Reply