AI problem?

General discussion for players of Oolite.

Moderators: winston, another_commander

Post Reply
User avatar
Fatleaf
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 1988
Joined: Tue Jun 08, 2010 5:11 am
Location: In analysis mode on Phaelon
Contact:

AI problem?

Post by Fatleaf »

I'm not sure where they come from, hence the posting in Discussions.

It is a group of one FDL and about four or six (I can't remember which) Asps. The FDL is a fugitive with about 158cr bounty and the Asps have about 5cr. The issue I am finding is that a lot of the times when I attack the Asps they do not react at all and let me merrily blow them up while following the FDL.

Is this group part of the main game or oxp? And what can be done to make the Asps respond to being attacked?
Find out about the early influences of Fatleaf here. Also his OXP's!
Holds the Ooniversal record for "Thread Necromancy"
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: AI problem?

Post by Smivs »

This doesn't sound like part of the core game, so my guess would be an OXP. No idea which one though :(
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:

Re: AI problem?

Post by Commander McLane »

Fatleaf wrote:
I'm not sure where they come from, hence the posting in Discussions.

It is a group of one FDL and about four or six (I can't remember which) Asps. The FDL is a fugitive with about 158cr bounty and the Asps have about 5cr. The issue I am finding is that a lot of the times when I attack the Asps they do not react at all and let me merrily blow them up while following the FDL.

Is this group part of the main game or oxp? And what can be done to make the Asps respond to being attacked?
Do you have Debug.oxp installed? If so, you could find out which AI the FDL and its escorts (supposing they are proper escorts) are using. If it's a custom AI for the FLD (as opposed to the default pirate AI) it may be that it's lacking the proper commands to deal with attacks on the escorts.
User avatar
Fatleaf
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 1988
Joined: Tue Jun 08, 2010 5:11 am
Location: In analysis mode on Phaelon
Contact:

Re: AI problem?

Post by Fatleaf »

No I don't have Debug installed, even though I have been encouraged to do so :roll:

I will have a trawl through my AddOns folder and see if I can find the oxp.
Find out about the early influences of Fatleaf here. Also his OXP's!
Holds the Ooniversal record for "Thread Necromancy"
User avatar
Fatleaf
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 1988
Joined: Tue Jun 08, 2010 5:11 am
Location: In analysis mode on Phaelon
Contact:

Re: AI problem?

Post by Fatleaf »

I found it. It is in the UPS-courier v1.7.8.oxp

upsAspEscortAI

Code: Select all

{
    GLOBAL = {ENTER = ("setStateTo: BEGIN_BUSINESS", "pauseAI: 2.0"); }; 
    "FLYING_ESCORT" = {
		ENTER = ("setDesiredRangeTo: 0.0", performEscort, "pauseAI: 15"); 
		"GROUP_ATTACK_TARGET" = (setTargetToFoundTarget, "setAITo: interceptAI.plist"); 
		ESCORTING = ("setDesiredRangeTo: 0.0", performEscort);
		"INCOMING_MISSILE" = ("messageMother: INCOMING_MISSILE"); 
		"ATTACKED" = ("messageMother: ATTACKED", "messageMother: ESCORT_ATTACKED"); 
		"NOT_ESCORTING" = ("setStateTo: LOOK_FOR_BUSINESS"); 
		"TARGET_LOST" = ("setStateTo: LOOK_FOR_BUSINESS"); 
		"TARGET_DESTROYED" = ("setStateTo: LOOK_FOR_BUSINESS"); 
		"ENTER WORMHOLE" = ("setStateTo: ENTER_WORMHOLE");
		UPDATE = (escortCheckMother, "pauseAI: 15"); 
    }; 
    "BEGIN_BUSINESS" = {
		ENTER = ("pauseAI: 1.0"); 
		"LAUNCHED OKAY" = ("setStateTo: CLEAR_STATION");
		ATTACKED = (setTargetToPrimaryAggressor, "setAITo: interceptAI.plist");
		ESCORTING = ("setDesiredRangeTo: 0.0", "setStateTo: FLYING_ESCORT");
		"NOT_ESCORTING" = ("setStateTo: LOOK_FOR_BUSINESS");
		UPDATE = (escortCheckMother); 
    }; 
    "ENTER_WORMHOLE" = {
		ENTER = (setDestinationToTarget, "setDesiredRangeTo: 1.0", "setSpeedFactorTo: 1.0",
			performFlyToRangeFromDestination);
		"PLAYER WITCHSPACE" = (enterTargetWormhole);
    }; 
    "CLEAR_STATION" = {
		ENTER = (getWitchspaceEntryCoordinates, setDestinationFromCoordinates, "setDesiredRangeTo: 2000.0", 
			"setSpeedFactorTo: 0.50", performFlyToRangeFromDestination);
		"DESIRED_RANGE_ACHIEVED" = ("setStateTo: LOOK_FOR_BUSINESS");
		"TARGET_FOUND" = (setTargetToFoundTarget, suggestEscort); 
  		ESCORTING = ("setDesiredRangeTo: 0.0", "setStateTo: FLYING_ESCORT");
		UPDATE = (scanForFormationLeader, "pauseAI: 15.0"); 
    }; 
    "LOOK_FOR_BUSINESS" = {
        	ENTER = (scanForFormationLeader); 
		"LAUNCHED OKAY" = ("setStateTo: CLEAR_STATION");
        	ATTACKED = (setTargetToPrimaryAggressor, "setAITo: interceptAI.plist");
        	RESTARTED = ("setStateTo: BEGIN_BUSINESS");
		ESCORTING = ("setDesiredRangeTo: 0.0", "setStateTo: FLYING_ESCORT");
        	"TARGET_FOUND" = (setTargetToFoundTarget, suggestEscort); 
		"NOTHING_FOUND" = ("switchAITo: pirateAI.plist"); 
		UPDATE = ("pauseAI: 7.5", scanForFormationLeader); 
    }; 
}
I am not very good with AI's so I post it here.
Find out about the early influences of Fatleaf here. Also his OXP's!
Holds the Ooniversal record for "Thread Necromancy"
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: AI problem?

Post by Eric Walch »

I already wanted to say that UPS contains a FdL with Asp escorts. :wink:

Although the problem is not in the escort AI. escorts are dumb and should not act on their own. So, when they are not reacting, it is their leader who is to blame. Originally that AI was an improved version of the pirateAI. But in the mean time, I improved Oolites own pirateAI further and forgot to add them in ups itself. Your discovery should only happen when you start the attack. Than the FdL forgets to notify its escorts it is going to attack.

In oolite it was already fixed in 2009, before that all escorted pirated had the same bug. That is the problem of custom AI. You don't have the benefits of the constant improvement of the general AI's. In the current situation its probably better when I switch to a plain pirateAI for this ship.
--

About finding ship info: When you are not using the console, you can always make a target dump by targeting a ship and than press shift-H while un-paused. You get some general info about the ship in your log. In this case it would contain an AI name with 'ups' in it.
User avatar
Fatleaf
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 1988
Joined: Tue Jun 08, 2010 5:11 am
Location: In analysis mode on Phaelon
Contact:

Re: AI problem?

Post by Fatleaf »

At least you are aware of the issue and it is going to be improved when you are ready.
I knew about the target dump. I learned about that function with the disappearing pod issue. But I completely forgot about it. Thanks for the reminder :D
Find out about the early influences of Fatleaf here. Also his OXP's!
Holds the Ooniversal record for "Thread Necromancy"
Post Reply