FakeFishGames / Barotrauma

A 2D online multiplayer game taking place in a submarine travelling through the icy depths of Jupiter's moon Europa.
http://www.barotraumagame.com/
1.74k stars 406 forks source link

[Design / Bot AI] Bots overdose themselves with fentanyl when there are no bandages against burns #8861

Closed Oukido closed 2 years ago

Oukido commented 2 years ago

Description When bots suffer alot of burn damage but there are no [Antibleeding] available they will use high doses of fentanyl to cure the burns which instantly gets them overdosed.

This is probably due to Fentanyl having a suitability of 15 for burns whereas better medications have lower suitability.

Comparison: Morphine: Suitability: 1 | Reduction: 5x 0.1 Fentanyl: Suitability: 15 | Reduction: 5x 1 Opium: Suitability: 5 | Reduction: 5x 1 Pomegrenadeextract: Suitability: 15 | Reduction: 25x 0.25

Fentanyl should have less suitability since it is equally effective as opium which is way milder. Pomegrenadeextract should have more suitability since it is more effective. Bots should not spam medications to wait out the sideeffects (oxygen low/ delayed effect) Also they use one dosage per limb which might cause a problem

Version grafik

Regalis11 commented 2 years ago

Thank you for the report!

The bots should take the side effects (oxygen low, opiate addiction & opiate overdose) into account when determining which treatments are suitable, but looks like that was broken: the calculations only took "positive suitabilities" into account, but not e.g. that oxygen low reduces the suitability of fentanyl.

Should be fixed in https://github.com/Regalis11/Barotrauma-development/commit/b516d3a51dd374f910af5773b3936144a7487670. Note for testing: the suitability calculations have been broken for a while it seems, and it may be that this fix makes the bots a bit too careful in using opiates. So this probably needs quite thorough testing and possibly further adjustments.

Also adjusted the suitability values of fentanyl and pomegrenade extract in https://github.com/Regalis11/Barotrauma-development/commit/4dd909d6d2ec2c9eac1ead0810e3e861958654c3

BlackMoons commented 2 years ago

Looking forward to the tweaks. Medical bots are generally disliked in online campaigns because they 'waste medicine'

It also seems like with burns, they heal people far too soon, ie people with 90% health, and when using bandages for that, you end up using like 2+ bandages for one person.

Maybe there should be some suitability calculation based on the cost of the item vs benefit? Especially since some medications affect one limb while others do several.

Ie: if healing someone with a bandage is only going to restore <5% vitality, because it only affects one limb but they have injuries all over, don't do it (Repair injuries). If all the injuries are to one limb (bites), bandage would be a great use.

If injuries are to multiple limbs, that makes other treatments more suitable.

Maybe something like: Only use a medication if the medication if person is below 60% vitality/badly bleeding, or if the medication dose would be 50% effective or more. (as in, the amount healed vs the amount it could heal). This would automatically heavily favor bandages, Pomegrenadeextract etc for people with minor injuries while unlocking heavier healing items for people who are nearly dead.

You could also potentially give bots a 2 different healing order. "Rescue (60% or less vitality)" vs "Heal (80% or less vitality)" depending on how aggressive the bot should be about healing, since often you just wanna deal with it at the next outpost because of how much cheaper medical services are there.

Rokvach commented 2 years ago

Tested, bot used fentanyl first but once the bot got a overdose it switched to opium, didn't find any other issues. Seems to be working correctly, closing.