Give up on an engine only when it has never run on this machine - #82
Merged
Merged
Conversation
Three failures in a row put a whole engine down for the session, which is right for an engine the machine cannot run and wrong for an engine that runs fine and has one shape this machine cannot measure. The five runs of a shape sit next to each other in the matrix order, so a bad shape reads as three in a row and takes the other nine hundred cells with it. A cell on the disk, or one measured in this session, is proof the engine runs here. With that proof the sweep walks past the bad shape and pays one run for each of its cells, once, because the attempt count added in #81 leaves them alone on the next sweep.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The 32 core box stopped at 45 cells of 60 after #81 was deployed to it, and its own sweep log says why.
GIVE_UPfires beforeTRIESever can. The five runs of one shape are consecutive in the matrix order, so a shape that box cannot measure is three failures in a row on the third run, the engine goes down, and the eleven cells after it are never attempted. The count from #81 needs four full sweeps to bite and the engine is gone after one.The rule was written for an engine the machine cannot run at all, where attempting a thousand cells to learn that costs a day. That is a real case and it stays. What tells the two apart is whether the engine has ever produced a cell here. One on the disk, or one measured in this session, and the failures are about a shape rather than about the engine, so the sweep walks on. The cost of walking on is one run for each remaining bad cell, once, because the attempt count then leaves those cells alone on the next sweep. The cost of not walking on is a sweep that stops at the same place however many times it is restarted.
put_downis the whole decision and it has its own test.whats_leftcollects the engines with a cell already on the disk, which is what makes this work on a restart rather than only within one session.