logoalt Hacker News

shadowphotoday at 2:46 AM1 replyview on HN

>If the goal is consistency, then wall-clock isn't the simple way to do it.

It’s simpler than doing a limit on number of states, and for some applications consistency isn’t super important.

Doing a time limit also enforces bot moving in a reasonable time. It puts a nice limit to set up a compromise between speed and difficulty.

Doing state limit with a time limit might be better way to do it, but is harder.


Replies

Dylan16807today at 8:18 AM

> It’s simpler than doing a limit on number of states

According to who?

A counter that you ++ each move sounds a lot easier to me than throwing off a separate thread/callback to handle a timer.

> Doing a time limit also enforces bot moving in a reasonable time.

It's designed for specific hardware, and will never have to run on anything significantly slower, but might have to run on things significantly faster. It doesn't need a time cutoff that would only matter in weird circumstances and make it do a weirdly bad move. It needs to be ready for the future.

> It puts a nice limit to set up a compromise between speed and difficulty.

Both methods have that compromise, but using time is way more volatile.