Arithmetic error in reactor stability AI override

Please come here to inform us of new and interesting bugs so we can hunt them down and destroy them! Pics and videos demonstrating these bugs are also welcome!
Post Reply
justinjah91
Posts: 125
Joined: Thu Jan 12, 2017 12:22 am

Arithmetic error in reactor stability AI override

Post by justinjah91 » Fri Feb 25, 2022 5:17 pm

----------------------------
Bug Report
----------------------------
OS: Windows 10
Game Version: 1.18.3
Date and Time Encountered (DD/MM/YY, HH:MM (12h format)): 25/02/22, 3:00 PM US Central
----------------------------
Possible Conflicting Software (such as firewalls and anti-virus): None
Severity: Minor(ish)
Description of Bug: The AI override "Reactor stability >= X%" may be having a bit of a floating point issue. I have my engbot set to reduce weapon power if "Reactor stability < 100%", yet he reduces weapon power even when the ship is idling (see screenshot). The AI priorities do not seem to register that the stability is equal to 100 (and therefore NOT < 100). The opposite is also true if I invert the inequality. At idle, "Reactor stability >= 100%" is NOT active. See screenshots for more detail.

Steps to Reproduce: Others in the discord have reported that this is working correctly for them, so I'm not sure what the issue is. I've tested across multiple reactor types and gotten the same error.

Possible Workaround: Switching from 100% to 99% seems to do the trick almost identically, but it is odd that this is an issue.
----------------------------
Screenshots:

Note the reactor temp/stability and the flashing override in this image. In this instance, that override should not be getting evaluated as true.
Image

Note the reactor temp/stability and the flashing override in this image. In this instance, that override should be getting evaluated as true.
Image
----------------------------
Hardware Configuration:

CPU: AMD Ryzen 4600H
GPU: Nvidia GTX 1650
RAM: 8 GB
Motherboard: HP Pavilion 570 Slimline 270 Series Intel Socket LGA1151
HDD: N/A
SSD: 1 TB
----------------------------

User avatar
cptslog
Leafy Developer
Leafy Developer
Posts: 1109
Joined: Sun Sep 08, 2013 9:08 pm

Re: Arithmetic error in reactor stability AI override

Post by cptslog » Fri Feb 03, 2023 3:23 pm

Thank you for the report!

It does seem like a tweak to the floating point comparison in this case could make it smoother, we'll look into it shortly

Post Reply