DOJ logoDOJ
Problems
Recently added problemsSaved problemsWorkbooks
CategoriesDLCContestsGroupsTeamsBoard
Ranking
Solved Problem RankingStreak rankingDOJ Power ranking
Status
Call for TasksLoginRegister
DOJ logoDOJ

Community online judge with OI-style subtask scoring, Elo ratings, and Discord account linking.

Problems
ProblemsCategories
Community
ContestsRankingBoardNoticesHost an external contestGuide
Account
LoginRegisterJudge Status
Policy
Terms of ServiceDLC RulesPrivacyAPI documentationLanguage runtimesContest rank rewardsRating and performance
© 2026 DOJ
All rights reserved
Editorial

Holmes and Watson's Bet (Large)

Back to problem

Editorial

A natural starting point is to implement the intended construction from the original Holmes and Watson's Bet, and then run a more carefully engineered simulated annealing search on top of it.

Once TTT reaches the scale of billions, evaluating a single candidate board by direct simulation becomes expensive. At the same time, changing only one mirror can drastically reduce the score, so the search easily gets trapped in a local optimum. Both the evaluation cost and the locality of the search must therefore be addressed.

With the K-structure from the original intended solution, an excursion from the central 8×88\times88×8 region to the outside and back has a regular form. This allows a candidate to be estimated without simulating every move directly: combine the number of times the K-structure is traversed, the average number of moves spent in that structure, and the number of moves inside the central 8×88\times88×8 region.

Long-period infinite-loop boards are also useful for escaping local optima. By changing a small number of cells, such a cycle can sometimes be broken into a long finite trajectory or transformed into an even longer cycle. However, a long state-space period is not the same as visiting new cells for a long time. If the robot repeatedly visits the same cells, placing the start and finish near the ends of the state cycle may still produce a much smaller actual TTT.

Keeping long-cycle boards in a separate pool and reusing them as material for simulated annealing helps the search leave one local basin and move into a different region of the state space.

In the original problem, plain simulated annealing could reach an accepted score even without the K-structure. For the Large version, directly searching an unstructured 14×1414\times1414×14 interior all the way to T=5×109T=5\times10^9T=5×109 is impractical. Structural acceleration and stronger search techniques are both important.

Solution written by GPT5.6