hacknet.js: make this run based on whether the ratio of upgrades are still within threshold instead of until Netburners requirements are met, to make it more flexible. main.js, README.md: include changes to accomodate "hacknet.js" updates.
[?]
Sep 9, 2020, 11:43 AM
CEZ56FCMUQARV6EAVERV6VCQHODPUMID3TCZKB6BBSIHKN7TUMEQCDependencies
- [2]
J7PIMHBDhacknet.js: add. main.js, README.md: update. - [3]
R7OI6M4Uoptimise for gain rate increase per cost to simplify computation by decreasing iterations done. - [4]
JGNALSUQadd "cyclic_weaken.js" feature. hacker.js, main.js, libs: refactor. README.md: update. - [5]
IFVY3INIcontracts.js: add --verbose and --check-delay options. README.md: update. - [6]
CTUEOIV2hacknet.js: take into account the gain rate increases of upgrades. - [7]
2BKHJI2Sinit - [8]
JS52JD4Qweaken_manager.js: add. lib_server_used.js: move to lib_ram_script. lib_ps: delete. main.js, hacker.js, lib_ram_script.js: refactor. README.md: update. - [*]
FBAPT2WWexecutables: dynamically load help messages. lshw.js, main.js: add options to change score correction method and score factor multipliers. README.md: update.
Change contents
- replacement in sbin/hacknet.js at line 1
// hacknet.js - 5.6 GB - purchases nodes and upgrades them until the node requirements for joining Netburners are met.// hacknet.js - 5.6 GB - purchases nodes and upgrades them until the highest gain rate increase per cost ratio of the possible upgrades are below a given threshold. - replacement in sbin/hacknet.js at line 69
integer_netburners_level = 100,integer_netburners_ram = 8,integer_netburner_cores = 4;float_minimum_ratio = ns.args[1]; - replacement in sbin/hacknet.js at line 81
!(integer_netburners_level <= object_nodes_stats.level &&integer_netburners_ram <= object_nodes_stats.ram &&integer_netburner_cores <= object_nodes_stats.cores);; - replacement in sbin/hacknet.js at line 125
if (object_nodes_stats.level < integer_netburners_level &&float_ratio_level > object_upgrade.float_gain_rate_increase_cost_ratio) {if (float_ratio_level > object_upgrade.float_gain_rate_increase_cost_ratio) { - replacement in sbin/hacknet.js at line 131
if (object_nodes_stats.ram < integer_netburners_ram &&float_ratio_ram > object_upgrade.float_gain_rate_increase_cost_ratio) {if (float_ratio_ram > object_upgrade.float_gain_rate_increase_cost_ratio) { - replacement in sbin/hacknet.js at line 137[4.2950]→[4.14389:14400](∅→∅),[4.14389]→[4.14389:14400](∅→∅),[4.14400]→[3.2343:2484](∅→∅),[3.2484]→[4.14493:14503](∅→∅),[4.3074]→[4.14493:14503](∅→∅),[4.14493]→[4.14493:14503](∅→∅)
if (object_nodes_stats.cores < integer_netburner_cores &&float_ratio_cores > object_upgrade.float_gain_rate_increase_cost_ratio) {if (float_ratio_cores > object_upgrade.float_gain_rate_increase_cost_ratio) { - replacement in sbin/hacknet.js at line 144
object_upgrade.void_upgrade();if (object_upgrade.float_gain_rate_increase_cost_ratio >= float_minimum_ratio) {object_upgrade.void_upgrade();} else {break;} - edit in bin/main.js at line 54
// minimum gain rate increase per cost ratio used by the hacknet managerfloat_gain_rate_increase_cost_ratio: 0.0005, - edit in bin/main.js at line 139
},hacknet_ratio: {short: "x",long: "hacknet-ratio", - edit in bin/main.js at line 227
float_gain_rate_increase_cost_ratio = object_defaults.float_gain_rate_increase_cost_ratio, - edit in bin/main.js at line 311
break;case object_argument_names.hacknet_ratio.short:// fall-throughcase object_argument_names.hacknet_ratio.long:float_gain_rate_increase_cost_ratio = argument_value; - replacement in bin/main.js at line 366
args: [float_period_check_seconds],args: [float_period_check_seconds,float_gain_rate_increase_cost_ratio], - replacement in bin/main.js at line 541
FLOAT = The fraction of the botnet's current available RAM to be used by ${object_helpers.string_weaken_manager} to run threads of "${object_helpers.string_cyclic_weaken}". Should be a floating point number > 0. Defaults to ${object_defaults.float_ram_fraction_for_weaken_cyclic}.`FLOAT = The fraction of the botnet's current available RAM to be used by ${object_helpers.string_weaken_manager} to run threads of "${object_helpers.string_cyclic_weaken}". Should be a floating point number > 0. Defaults to ${object_defaults.float_ram_fraction_for_weaken_cyclic}.-${object_argument_names.hacknet_ratio.short}, --${object_argument_names.hacknet_ratio.long} <FLOAT>FLOAT = A value used in determining if "${object_helpers.string_hack_net}" should continue buying new Hacknet nodes/upgrades for these. Should be a floating point number >= 0. Higher values indicates a greater threshold so less upgrades/new nodes will be bought. Defaults to ${object_defaults.float_gain_rate_increase_cost_ratio}.` - edit in README.md at line 124[4.39005][10.13794]
`-x, --hacknet-ratio <FLOAT>`* FLOAT = A value used in determining if "hacknet.js" should continue buying new Hacknet nodes/upgrades for these. Should be a floating point number >= 0. Higher values indicates a greater threshold so less upgrades/new nodes will be bought. Defaults to 0.0005.