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 grand memory gobbler
Moderators: winston, another_commander, Getafix
- Arexack_Heretic
- 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:
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...
Yip, Giles explained what happened.... Here:
(Edit:) With GalCops, probably similar: chasing a baddie, and it ejects, so ship becomes uncontrolled entity, AI confused etc...
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...
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.
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.