Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implemention of #308 hacknet nodes max ram usage #314

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

samohtGTO
Copy link

here is the code for my suggestion.

@samohtGTO samohtGTO changed the title Samohtgto/issue308 implemention of308 Jul 1, 2023
@samohtGTO samohtGTO changed the title implemention of308 implemention of #308 hacknet nodes max ram usage Jul 1, 2023
@alainbryden
Copy link
Owner

My only feedback here is that the default should be 1.0 (to default to the current behaviour) - but other than that, it's great to have the extra option to tweak.

We may also wish to add something to autopilot which sets this automatically to a lower number it bitnodes where hacking is less important and/or hashes are more important.

@@ -33,6 +33,7 @@ const argsSchema = [
['n', false], // Can toggle on using hacknet nodes for extra hacking ram (at the expense of hash production)
['use-hacknet-nodes', false], // Same as above (kept for backwards compatibility, but these are now called hacknet-servers)
['use-hacknet-servers', false], // Same as above, but the game recently renamed these
['hacknet-use-ram-percentage', 0.75],
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
['hacknet-use-ram-percentage', 0.75],
['hacknet-use-ram-percentage', 1.00],

@@ -118,6 +119,7 @@ let xpOnly = false; // "-x" command line arg - focus on a strategy that produces
let verbose = false; // "-v" command line arg - Detailed logs about batch scheduling / tuning
let runOnce = false; // "-o" command line arg - Good for debugging, run the main targettomg loop once then stop
let useHacknetNodes = false; // "-n" command line arg - Can toggle using hacknet nodes for extra hacking ram
let hacknetUsePercentage = 0.75 // How much ram percentage ram from the hacknet is getting used.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let hacknetUsePercentage = 0.75 // How much ram percentage ram from the hacknet is getting used.
let hacknetUsePercentage = 1.00 // How much ram percentage ram from the hacknet is getting used.

@@ -250,6 +252,7 @@ export async function main(ns) {
stockMode = (options.s || options['stock-manipulation'] || options['stock-manipulation-focus']) && !options['disable-stock-manipulation'];
stockFocus = options['stock-manipulation-focus'] && !options['disable-stock-manipulation'];
useHacknetNodes = options.n || options['use-hacknet-nodes'] || options['use-hacknet-servers'];
hacknetUsePercentage = Math.max(options['hacknet-use-ram-percentage'])
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
hacknetUsePercentage = Math.max(options['hacknet-use-ram-percentage'])
hacknetUsePercentage = options['hacknet-use-ram-percentage']

Not sure why the max was there, it would do nothing

@alainbryden alainbryden added the enhancement New feature or request label Oct 2, 2024
@alainbryden alainbryden added the work-in-progress not ready for merge label Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request work-in-progress not ready for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants