day23

command
v0.0.0-...-6a72c64 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 10, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Evaluate state, identify all possible moves - for every piece, that is not locked or already in final position, ... - look at every possible move:

  • if in corridor, can it move to its destination (without blocking a piece already there)?
  • if in its tunnel, can it move to the corridor?
  • in either case, check that it is not blocked

- if no possible moves, check if final state reached => solution

Try every possible move from that state - create a copy of the current state - move the piece there, counting steps - add this move to this copy of the game - recursively evaluate the resulting state copy

AK, 23-26 December 2021

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL