-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtodo
112 lines (98 loc) · 4.05 KB
/
todo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
housekeeping:
- move the concept of adjacency further down the stack than Grid class. Grid has no reason to care about this.
- fix the wrong assumption that given numbers are ALWAYS white. remove knowledge of givens from board.py. redo RCHARS etc to reflect this.
- clean up masyu.valid_junction_givens
- in slither and masyu, reduce duplication of x = x * 2 + 1 and x = x // 2 - 1
features:
- auto-generate legal positions, as a screen-saver
- optimal solution path
- what is the assumption path that requires the fewest validity checks?
- this might require slower solving which parallelizes solution threads
bugs:
- validity methods assume that board has no internal holes, involving is_edge and loop conditions. a loop around a hole will falsely be considered not a loop
nurikabe:
- orphan groups reaching validation to check the number as well. this will supersede the reachability check.
new puzzles:
- puzzles using square grid
. hitori
. kuromasu
. dynasty
. mochikoro
. bijutsukan
. picross (nonogramme)
. light up
- puzzles using hex grid
- loop puzzles
. slither link
. masyu
- update Tritower.valid_tower_loops to handle arbitrary shapes
solving:
- make solver able to handle a huge blank board
- detect multiple solutions
gui:
- refactor to make graphical main a top-level function, which operates a gui class
- separate classes for triangle and square and line grids
- computer-assisted puzzle authoring
- human-placed givens in black
- computer fills in solution in grey
- notifies if puzzle is contradictory
- human-guided computer solving
- computer does what it can, at full speed
- as the human sees a possible conclusion, he marks it
- computer verifies it
- learn about priority from human?
- do square grid gui
. move triangle or square grid display functions to new class
- solve puzzles interactively
- show slowed-down, smoothed out solving animation
- buttons and stuff
. "attempt to solve" button
. check box for whether to immediately show invalid
- localized invalidity display
optimization:
- consolidate depth-first search functions into a common place
- use a stack instead of recursion?
- pattern recognition. automate the process of discovering the smallest, most common patterns that produce a deep conclusion. use these patterns to prioritize patterns that will produce a conclusion
- add a small random component to priority function to avoid collisions and stable sorting
- spaces which yield 0-length assumption threads get prioritized down for future conclusion threads
- prioritize position/color pairs instead of just positions
- slither link, white next to a 3
rejected optimizations:
- tune priority function constants
- automatically with genetic algorithm?
- nurikabe reachable, track whether groups are fulfilled. fulfilled groups can't reach beyond their group
rejected optimizations:
- branch separation and persistence
. build a list of spaces that the branch depends on
. if a conclusion is made that doesn't affect the branch, don't restart the branch
- branch-merge
. when paired (black / white) solution branches reach common conclusions, it must be true
- branch-substitution
. when one branch of a pair reaches a solution, and the other branch has already concluded things, those then apply to the parent branch, and it isn't necessary to derive them again
- instead of copying whole board, create an overlay dictionary which only has the values of changed cells
- possibly use dict.update() to propagate changes
- perhaps track positions that may duplicate each other, and detect transitions where 2 threads get to the same board
compact format:
-3--
-0-2
1-3-
-1-1
full format:
+.+-+.+-+
. |3| | |
+-+.+-+.+
| .0. .2|
+.+.+-+-+
|1. |3. .
+.+.+-+.+
| .1. |1.
+-+-+-+.+
masyu:
- earlier detection of a node outside the loop
new puzzle type, domino-tree:
- black cells must pair into dominoes
- each black cell has exactly one black neighbor
- dominoes may not touch orthogonally
- all dominoes must connect to other dominoes at the corners
- no domino loops
- given numbers like in mines