Re:Ask YC: What project to work on?
by jacquesm on Saturday September 12, 2009 @09:28AM
(#818892)
Ah, good point! You'd have to keep quite a few digests of the 'state' to figure out that you're caught in a loop, the 'halting problem' in disguise.
You could work out the size of the cycle by checking the lower and upper limit of the populations though, if the lower and upper limits have not changed for a number of cycles it could also be end-of-game.
Re:Ask YC: What project to work on?
by m_eiman on Saturday September 12, 2009 @10:47AM
(#818968)
Store evey state, and if you ever get a state you've already stored you know you're in a loop. Should be possible to store it in very few bytes in "raw" form, and then compress it for good measure.
You could work out the size of the cycle by checking the lower and upper limit of the populations though, if the lower and upper limits have not changed for a number of cycles it could also be end-of-game.