bitburner-official / bitburner-src

Bitburner source code.
Other
688 stars 232 forks source link

INFILTRATION: Handle automated infiltration #1414

Closed catloversg closed 1 week ago

catloversg commented 2 weeks ago

Infiltration has never been balanced to be played by an automation script. In our code base, we prohibit it with the checks in src\Infiltration\ui\Game.tsx and src\Infiltration\ui\KeyHandler.tsx, but our checks are wrong:

With these bugs, our standpoint on automated infiltration is weird. We prohibit it, but we don't do anything to prevent it. There are 3 ways to deal with it:

[3] is a big overhaul, so that's not the job of this PR. This PR uses [1]. This is a controversial change because the automated infiltration script is widespread, and many people like it. If the maintainers want, I will change it to [2].

d0sboots commented 2 weeks ago

My personal stance has always been to lean towards (2). For instance, infil rewards could be scaled based on how many successful infiltrations you've done in the past 15 minutes. Done properly, it wouldn't affect manual infil rewards, while reducing the profit of automated infil to balancable levels. This would open the door to infil eventually becoming an official singularity API.

I think @Snarling needs to weigh in here.

otac0n commented 1 week ago

As a player, I would really prefer to have some built-in ways to develop this myself rather than downloading someone else's script. I 100% expected to be able to do it as part of singularity.

Snarling commented 1 week ago

It's already clear that automating infiltration is not officially supported:

  1. There's no API for it
  2. Bypassing the anti-automation protections is not impossible but does require specific workarounds.

Why not beef up the anti-automation protections?

  1. It is not realistic to patch every possible way the player can access game internals, so our general stance on exploits is not to try and patch them out.
  2. Bypassing game protections is fun for players, we don't need to make everything as bulletproof as possible.\

Why not officially support automation?

  1. An API doesn't really make sense for it. If the game state is clearly communicated to the player through an API, then it becomes extremely straightforward to program in the correct response to win a given game. None of the games present any difficulty when given a programmable API.
  2. The main challenge of an automated infiltration script (especially if not taking "inspiration" from an existing one) is figuring out how to scrape the game state from the document, and how to spoof the events to play the games.

Other thoughts:

  1. Infiltration is currently too strong to allow automation via an official API.
  2. The strength of automated infiltration makes players feel more accomplished when they are able to successfully automate it.
  3. If automating it is not officially supported, it's fine for it to have the high rewards it currently does, because it's effectively an exploit.
Snarling commented 1 week ago

The changes in this PR can also be worked around, so I'd be fine with merging this just to spice things up and give an extra hurdle to players who want to automate infiltration.