lib_score.js: normalised scores against average instead of using arbitrary values.
[?]
Apr 29, 2020, 10:10 AM
IVSW4A6P6V4K5ZCXMOB4ENW45U6LNKX7HD7AYTCHNRBGC64FK5IACDependencies
- [2]
AXGQ7FMLsplit and refactor hacking logic to "hacker.js" and argument parsing and script execution logic to "main.js". update "README.md". - [3]
2BKHJI2Sinit - [4]
2LU5Y77Ofixed optimum percentage to steal calculator. - [5]
NC66CZ5Jrename certain variables that had the same names as ns functions to prevent the RAM checker from triggering. - [6]
RWMZ7DVLsplit and refactor various logics. update "README.md". - [7]
YXH7ERRNfixed bug that prevented helper scripts running if the "home" server does not have RAM bigger than the rest of the rooted servers. - [8]
3NFCZ6IPfixed the ram utilisation logic. added flags to `main.js` that can prevent the execution of helpers. - [9]
BZ6FC2BTadd `cp.js`. - [10]
7SRULDRFminor refactoring.
Change contents
- edit in lib/lib_score.js at line 64
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
float_get_skill_against(ns, string_server) -float_get_servers_hackable_mean_trait(ns, float_get_skill_against),(float_get_skill_against(ns, string_server) - float_mean_skill_against) /float_mean_skill_against, - replacement in lib/lib_score.js at line 80
ns.getServerMaxMoney(string_server) -float_get_servers_hackable_mean_trait(ns, float_get_server_cash_max),(ns.getServerMaxMoney(string_server) - float_mean_server_cash_max) /float_mean_server_cash_max, - replacement in lib/lib_score.js at line 83
ns.getServerGrowth(string_server) -float_get_servers_hackable_mean_trait(ns, float_get_server_growth);(ns.getServerGrowth(string_server) - float_mean_server_growth) /float_mean_server_growth; - replacement in lib/lib_score.js at line 86
// 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// 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
100 * float_factor_skill +0.00000001 * float_factor_max_cash +1 * float_factor_skill +1 * float_factor_max_cash + - replacement in bin/main.js at line 1
/* main.js - this should always equal the same RAM as "hacker.js", edit `void_no_op` to make it so - TODO:/* main.js - 6.9GB - TODO: