lib_score.js: normalised scores against average instead of using arbitrary values.

[?]
Apr 29, 2020, 10:10 AM
IVSW4A6P6V4K5ZCXMOB4ENW45U6LNKX7HD7AYTCHNRBGC64FK5IAC

Dependencies

  • [2] AXGQ7FML split and refactor hacking logic to "hacker.js" and argument parsing and script execution logic to "main.js". update "README.md".
  • [3] 2BKHJI2S init
  • [4] 2LU5Y77O fixed optimum percentage to steal calculator.
  • [5] NC66CZ5J rename certain variables that had the same names as ns functions to prevent the RAM checker from triggering.
  • [6] RWMZ7DVL split and refactor various logics. update "README.md".
  • [7] YXH7ERRN fixed bug that prevented helper scripts running if the "home" server does not have RAM bigger than the rest of the rooted servers.
  • [8] 3NFCZ6IP fixed the ram utilisation logic. added flags to `main.js` that can prevent the execution of helpers.
  • [9] BZ6FC2BT add `cp.js`.
  • [10] 7SRULDRF minor refactoring.

Change contents

  • edit in lib/lib_score.js at line 64
    [3.3718128]
    [3.3718128]
    float_mean_skill_against = float_get_servers_hackable_mean_trait(
    ns,
    float_get_skill_against
    ),
    float_mean_server_cash_max = float_get_servers_hackable_mean_trait(
    ns,
    float_get_server_cash_max
    ),
    float_mean_server_growth = float_get_servers_hackable_mean_trait(
    ns,
    float_get_server_growth
    ),
  • replacement in lib/lib_score.js at line 77
    [3.3718153][3.3718153:3718278]()
    float_get_skill_against(ns, string_server) -
    float_get_servers_hackable_mean_trait(ns, float_get_skill_against),
    [3.3718153]
    [3.3718278]
    (float_get_skill_against(ns, string_server) - float_mean_skill_against) /
    float_mean_skill_against,
  • replacement in lib/lib_score.js at line 80
    [3.3718306][3.3718306:3718426]()
    ns.getServerMaxMoney(string_server) -
    float_get_servers_hackable_mean_trait(ns, float_get_server_cash_max),
    [3.3718306]
    [3.3718426]
    (ns.getServerMaxMoney(string_server) - float_mean_server_cash_max) /
    float_mean_server_cash_max,
  • replacement in lib/lib_score.js at line 83
    [3.3718452][3.3718452:3718568]()
    ns.getServerGrowth(string_server) -
    float_get_servers_hackable_mean_trait(ns, float_get_server_growth);
    [3.3718452]
    [3.3718568]
    (ns.getServerGrowth(string_server) - float_mean_server_growth) /
    float_mean_server_growth;
  • replacement in lib/lib_score.js at line 86
    [3.3718569][3.3718569:3718732]()
    // Can adjust the weights of the variables. the following values were chose to "normalise" the contribution of the factors to about +/- values in the tens place
    [3.3718569]
    [3.3718732]
    // Can adjust the weights of the variables. 1 = normal importance, > 1 = more importance, < 1 = less importance, 0 = not used, < 0 = negative effect.
  • replacement in lib/lib_score.js at line 88
    [3.3718743][3.3718743:3718815]()
    100 * float_factor_skill +
    0.00000001 * float_factor_max_cash +
    [3.3718743]
    [3.3718815]
    1 * float_factor_skill +
    1 * float_factor_max_cash +
  • replacement in bin/main.js at line 1
    [3.3793719][2.2477:2584]()
    /* main.js - this should always equal the same RAM as "hacker.js", edit `void_no_op` to make it so - TODO:
    [3.3793719]
    [2.2584]
    /* main.js - 6.9GB - TODO: