Hacker News new | ask | show | jobs
by jzwinck 4189 days ago
Can you explain in more detail what you mean by "limited instruction count execution that is machine independent"? For example:

- Is it measuring the count and making sure it doesn't exceed some threshold, or is the client API designed to actually give each client a specific number of instructions and terminate if that is exceeded?

- Does "machine independent" mean it needs to run outside of x86/amd64?

- Would it offend your sensibilities if CPU cycles used by C programs counted the same as those used by JVM programs?

1 comments

In the past we've had it where where each bot is allowed a certain amount of "computation", with different upgrades giving you more "computation" each turn.

Machine-independent isn't really the write word, more of that we want the same two bots fighting on the same maps to be deterministic regardless of the machine its being run on.

For mechanics like this, we've found that bytecode instruction counts are the best metric we currently have, since anything that is time-based could result in different results depending how the CPU schedules the bots, and doing something like using PIN or another system to count assembly instructions turns it into a competition of who can write the most optimized assembly code.