Commits

Author Commit Message Labels Comments Date
shl...@b384bcd7-cfd4-0310-aca0-d78b80f7b91b
Refactored.
shl...@b384bcd7-cfd4-0310-aca0-d78b80f7b91b
Add a test.
shl...@b384bcd7-cfd4-0310-aca0-d78b80f7b91b
Add the input_from_v1_string method.
shl...@b384bcd7-cfd4-0310-aca0-d78b80f7b91b
Correct a typo in the documentation.
shl...@b384bcd7-cfd4-0310-aca0-d78b80f7b91b
Working now - for "--seed=1". TODO : 1. Make sure that the clues of the top/bottom, left/right are shuffled randomly (to avoid predictability). 2. Check that the layout and the clues only have one solution.
shl...@b384bcd7-cfd4-0310-aca0-d78b80f7b91b
Fix bugs in the ABC Path generator. Still not perfect.
shl...@b384bcd7-cfd4-0310-aca0-d78b80f7b91b
Implement the --mode=riddle. This tries to find a combination of clues inside the final solution.
shl...@b384bcd7-cfd4-0310-aca0-d78b80f7b91b
Renamed a method. To calc_final_layout instead of generate.
shl...@b384bcd7-cfd4-0310-aca0-d78b80f7b91b
Small optimisation to _fisher_yates_shuffle.
shl...@b384bcd7-cfd4-0310-aca0-d78b80f7b91b
A small optimisation.
shl...@b384bcd7-cfd4-0310-aca0-d78b80f7b91b
Add the test.
shl...@b384bcd7-cfd4-0310-aca0-d78b80f7b91b
Extract a method.
shl...@b384bcd7-cfd4-0310-aca0-d78b80f7b91b
Optimised the connectivity DFS scan.
shl...@b384bcd7-cfd4-0310-aca0-d78b80f7b91b
Placed more stuff into _add_next_state.
shl...@b384bcd7-cfd4-0310-aca0-d78b80f7b91b
Got rid of unnecessary variables.
shl...@b384bcd7-cfd4-0310-aca0-d78b80f7b91b
Got rid of an unused field in the state.
shl...@b384bcd7-cfd4-0310-aca0-d78b80f7b91b
Convert fill_next_cells to get_next_state.
shl...@b384bcd7-cfd4-0310-aca0-d78b80f7b91b
Another optimisation. Made _get_next_cells accept the layout directly instead of the state.
shl...@b384bcd7-cfd4-0310-aca0-d78b80f7b91b
Convert the states to array refs.
shl...@b384bcd7-cfd4-0310-aca0-d78b80f7b91b
A small optimisation of reusing variables.
shl...@b384bcd7-cfd4-0310-aca0-d78b80f7b91b
A significant optimisation.
shl...@b384bcd7-cfd4-0310-aca0-d78b80f7b91b
Another small optimisation.
shl...@b384bcd7-cfd4-0310-aca0-d78b80f7b91b
Small optimisation using index.
shl...@b384bcd7-cfd4-0310-aca0-d78b80f7b91b
Convert a foreach { if { push } } loop to grep.
shl...@b384bcd7-cfd4-0310-aca0-d78b80f7b91b
Got rid of an assignment.
shl...@b384bcd7-cfd4-0310-aca0-d78b80f7b91b
Convert the return of _get_next_cells to indexes instead of xys. This made the runtime much faster - down to 3 seconds.
shl...@b384bcd7-cfd4-0310-aca0-d78b80f7b91b
Convert next_cell and the input to _get_next_cells to an index.
shl...@b384bcd7-cfd4-0310-aca0-d78b80f7b91b
More optimisation, this time by a lookup table.
shl...@b384bcd7-cfd4-0310-aca0-d78b80f7b91b
Optimised _get_next_cells. This reduced the run time to 10 seconds with --seed=24. nytprof reported it to consume the lion's share of the time.
shl...@b384bcd7-cfd4-0310-aca0-d78b80f7b91b
Convert identifiers away from "pos" - it was ambiguous.
  1. Prev
  2. Next