Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Simulator Enhancements (03/13/24)

Author Topic: Randomize default AI Hyperion teleport direction when it has no target  (Read 340 times)

Hiruma Kai

  • Admiral
  • *****
  • Posts: 878
    • View Profile

Just noticed a really weird sequence of AI Hyperion behavior.

From what I understand, when Hyperions don't have a desired teleport location and the AI activates the ship system, they default to teleporting directly to the right at the maximum distance (what I assume is 0 degrees on the map).  You can currently see this a lot in combat when Hyperions are trying to get away.  The predominantly go to the right.

I was just cleaning up an Ordo, when I noticed two Hyperions in a weird loop trying to get close to the last packet of enemy ships and fighters.   There was some left over debris vaguely in the way, and the Hyperions were jumping at exactly 0 degrees, almost directly away from the nearest enemy, despite the AI wanting to actually get closer, given their normal movement towards.  But they did it twice in the debris field.

I was partly able to replicate this in the simulator by generating some debris, and parking a Hyperion very close manually.  Putting it under autopilot immediately made it teleport away at 0 degrees to maximum distance, facing at 0 degrees and putting it's shield up.  This potentially makes it hard for Hyperions to cross a debris field in combat from right to left, although great for going from left to right.

Further simulator testing of creating debris on the right side of the map from where you spawn enemy ships, placing the Hyperion even further to the right, spawning an enemy ship, and then letting the AI Hyperion approach the enemy with the debris in between, resulting in the same kind of teleporting away behavior, facing to the right and raising the shield, and then finally turning around to approach the enemy again.

So, if Hyperions are to the right, this can lead to weird, undesired repeating behavior where they make little forward progress.  I don't know how hard it would be to code up a better location picker, or perhaps reduce their desire to teleport in the presence of debris, but at the very least, a random choice of teleport direction would significantly reduce the change of getting stuck in a real loop, in say, a heavy triple pirate armada fight.  If the Hyperion really doesn't care where it winds up, a random angle should be just as acceptable as zero degrees.

[attachment deleted by admin]
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Randomize default AI Hyperion teleport direction when it has no target
« Reply #1 on: January 14, 2022, 06:17:52 PM »

Hmm, that's strange - let me make a note to check into this. In theory the location they teleport to ought to consider where they want to go, but maybe something doesn't quite connect up the way it should, there. Thank you for the info!
Logged

SafariJohn

  • Admiral
  • *****
  • Posts: 3010
    • View Profile
Re: Randomize default AI Hyperion teleport direction when it has no target
« Reply #2 on: January 14, 2022, 06:59:41 PM »

This has been a longstanding problem. Blackrock's Karkinos battleship used the teleporter AI and was well known to usually jump straight right.
Logged

Thaago

  • Global Moderator
  • Admiral
  • *****
  • Posts: 7173
  • Harpoon Affectionado
    • View Profile
Re: Randomize default AI Hyperion teleport direction when it has no target
« Reply #3 on: January 14, 2022, 09:29:41 PM »

Right, this has been seen on stream during tournaments where the AI just gets stuck teleporting to the right. Anyone remember when it last happened so we can link the video? Was it in the last one, I just don't remember.
Logged