Bitburner

shodan.js

I’ve been playing a lot of BitBurner. It’s free on Steam, and Jordan put me on to it back in January (2022, for the future - this is a webpage, dammit, not a blog). I’ve always liked incremental games, and hey, an incremental game that was A: free and B: would let me rewrite reality to suit if I didn’t like the standard ways to get money? Sign me up!

I’ve spent the intervening month and change doing a mix of stealing code from other people - I mean, uh, using other people as inspiration - plus writing my own algorithms and then coding them into reality (or trying to).

Currently my active code is a script I’ve named shodan after the antagonist of the System Shock games. She’s clunky, and she’s broken, but the algorithm is basically this:

-- Scan all servers that exist.
-- For each Server:
    -- If I can gain access to it, do so, copy my standard tools and libraries scripts over, assign it a value based on its maximum
       money, count how many weaken threads it will take to zero out security, guess (it's a pretty good guess, without the Formulas
       API) how many grow threads it will take to cap the cash on the system. Add a note counting how many free blocks of RAM are 
       available - a block being 1.75 GB, as that's the size standard tools take (except `hack`, but I don't care about the spare 50MB 
       here and there).
    -- Value each server based on how much work it'll take to break it down, and how much money per second we can expect after doing so.
    -- For the most valuable server available, loop through every server I can run scripts on, setting blocks of WEAKENs where I can.
    -- Once I've set enough WEAKENs to reduce security to minimum, start placing GROWs.
    -- Don't forget to schedule more WEAKENs to compensate for the increased security from those GROWs.
    -- If security is cut down to minimal, aim a bunch of HACK to land right after the WEAKEN with the biggest date (still working on this code)

Shodan does some other things- or is supposed to do some other things - like upgrade home RAM and cores, buy a TOR router and pick up new programs as they’re available, plus keep committing crimes until the karma threshold for gangs is hit. Some of these optional features work better than others; what I’d like to do additionally is use the ability to read from the “local filesystem” to parse JSON objects into the system so I can configure its priorities on the fly (effectively shooting a SIGHUP to it).

In the most perfect of worlds, I would be able to write a set of “improv notes” for it, that are basically a series of stat goals for it to hit and an ordered priority list of what order to chase those stat goals in.

Unless otherwise specified, the contents of this page are ©2020-2024 Sean M. Ainsworth. All rights, including reproduction or modification, are reserved.