CPU constant

From Robowiki
Revision as of 23:26, 21 October 2017 by MultiplyByZer0 (talk | contribs) (Write page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The CPU constant is the maximum amount of time a robot is allowed per turn, in nanoseconds. It depends on CPU speed, and it is calculated based on the time of various Math methods. Its purpose is to compensate for different computers having different performance characteristics, and to limit robots to the same amount of calculations on all systems. Generally, it will be between 4000000 ns (4 ms) and 8000000 ns (8 ms).

The CPU constant can be recalculated with Options -> Recalculate CPU constant. The new constant will be displayed and logged to the console.

If a robot's execution time exceeds the CPU constant, it will skip a turn.

Screenshots

RecalculateCPUConstant.png