Przejdź do treści
Bity zamieszek

Bity zamieszek

  • Dom
  • Aktualności
  • Przewodniki
  • Przewodniki wideo
  • Opis zmian
  • Zgłoś nadużycie
  • Przełącz formularz wyszukiwania
Bitburnera

Bitburnera – Odds of Success (Crime Script)

Wysłany dnia 01/12/2022 Przez owenz Brak komentarzy NA Bitburnera – Odds of Success (Crime Script)
  • Tytuł: Bitburnera
  • Data wydania:
  • Wywoływacz:
  • Wydawca:
Informacje o Bitburner są nadal niekompletne. Pomóż nam wypełnić szczegóły gry za pomocą tego formularz kontaktowy.

A script that makes its choice based on the odds of success with the amount of money made and the time involved.

How it Works

By utilizing a small formula to evaluate the crime it is possible to make better choices on the outcomes.

The ranking is created by taking the amount of money that can be earned then multiplying that by the odds of the crime’s success and finally dividing that by the time taken.

There is definitely a more thought-out way to do this by it will give a very basic money per sec valuation which the script uses to make it’s choice.

Wymagania

  • Bitnode4
  • 17.10GB of Ram

Scenariusz

Create a file

nano crime.js

Throw the following into it

const crimes = [
    "heist",
    "assassination",
    "kidnap",
    "grand theft auto",
    "homicide",
    "larceny",
    "mug someone",
    "rob store",
    "shoplift",
];

/** @param {import(".").Ns } ns */
Eksportuj funkcja asynchroniczna główna(ns) {
    // Disable the log
    ns.disableLog("WSZYSTKO");

    ns.tail(); // Open a window to view the status of the script
    let timeout = 250; // In ms - too low of a time will result in a lockout/hang

    while (PRAWDA) {
        await ns.sleep(timeout); // Wait it out first
        if (ns.isBusy()) Kontynuować;
        /** Calculate the risk value of all crimes */
        let choices = crimes.map((crime) => {
            let crimeStats = ns.getCrimeStats(crime); // Let us look at the important bits
            let crimeChance = ns.getCrimeChance(crime); // We need to calculate if its worth it
            /** Using probabilty(odds) to calculate the "risk" to get the best reward
             *      Risk Value = Money Earned * Odds of Success(P(A) / ~P(A)) / Time taken
             *
             *  Larger risk values indicate a better choice
             */
            let crimeRiskValue =
                (crimeStats.money * Math.log10(crimeChance / (1 - crimeChance + Number.EPSILON))) /
                crimeStats.time;
            powrót [crime, crimeRiskValue];
        });

        let bestCrime = choices.reduce((prev, current) => {
            return prev[1] > current[1] ? prev : current;
        });

        ns.commitCrime(bestCrime[0]);
        ns.print(
            `Crime: ${bestCrime[0]} Risk Value: ${bestCrime[1].toPrecision(3)} Cash to Earn: \$${ns
                .getCrimeStats(bestCrime[0])
                .money.toPrecision(4)}`
        );
    }
}

Uruchomić

run crime.js

The script will attempt to go to the crime page if unlocked.

As a note if you have Sleeves unlocked with the bitnode it might be required to manually start the crime for the 1st time as if they are actively doing a task the

ns.isbusy()

reports back true until something is done. After that it works correctly.

Ostatnie przemyślenia

This script will follow it’s basic money making strategy and as the player gains better stats it will generate more and more money.

If the player does not boost their stats other than shop lifting it might get stuck in a shoplifting loop as it is only growing those stats making it better at doing so, gain some defense and strength will allow it to change to a better target.

To wszystko, co dzisiaj udostępniamy w tym celu Bitburnera przewodnik. Ten przewodnik został pierwotnie stworzony i napisany przez owenz. Na wypadek, gdybyśmy nie zaktualizowali tego przewodnika, możesz znaleźć najnowszą aktualizację, postępując zgodnie z tym połączyć.

Jeśli uważasz, że jakakolwiek treść na tej stronie narusza Twoje prawa, w tym Twoje prawa własności intelektualnej, prosimy o niezwłoczny kontakt za pomocą naszego formularza kontaktowego.
Przewodniki Tagi:Bitburnera

Nawigacja po wpisach

Poprzedni post: Zero Hour – All Watches and Wristband Codes
Następny post: Future Love Space Machine – All Console Commands and Usage

Zostaw odpowiedź Anuluj odpowiedź

Twój adres e-mail nie zostanie opublikowany. Wymagane pola są zaznaczone *

  • Tytuł: Bitburnera
  • Data wydania:
  • Wywoływacz:
  • Wydawca:
Informacje o Bitburner są nadal niekompletne. Pomóż nam wypełnić szczegóły gry za pomocą tego formularz kontaktowy.

Zastrzeżenie

Wszystkie cytowane treści pochodzą z odpowiednich źródeł. Jeśli uważasz, że wykorzystaliśmy Twoje treści bez pozwolenia, upewnij się, że się z nami skontaktujesz, a my potraktujemy to poważnie.
  • O nas
  • Skontaktuj się z nami
  • Polityka prywatności
  • Warunki usługi

Prawo autorskie © 2025 Bity zamieszek.

Zasilany przez Prasa Książka Aktualności Motyw WordPressa