Commit Graph

24 Commits

Author SHA1 Message Date
Camden Dixie O'Brien d14677339d Show known-safe tiles in print() 2025-03-22 13:30:25 +00:00
Camden Dixie O'Brien 120d393f12 Fill tiles in search if same in both branches
This gives a ~7% boost in solving ability.
2025-03-22 13:30:25 +00:00
Camden Dixie O'Brien dd3cabf11b Use queue for tiles to probe
This allows updating and searching until no more inferences can be
made, resulting in a ~5% improvement (also better performance).
2025-03-22 13:30:25 +00:00
Camden Dixie O'Brien 78779c74de Make macro for looping through adjacent tiles 2025-03-22 13:30:25 +00:00
Camden Dixie O'Brien 168cdd8e8e Add simple contradiction-driven search mechanism
Gets an about 6% improvement
2025-03-22 13:30:25 +00:00
Camden Dixie O'Brien 6e9a6810b3 Detect contradictions in update() 2025-03-22 13:30:25 +00:00
Camden Dixie O'Brien 0a99509524 Add SAFE state to indicate un-probed safe tile 2025-03-22 13:30:25 +00:00
Camden Dixie O'Brien 040148f782 Add error checking and better reporting 2025-03-22 13:30:24 +00:00
Camden Dixie O'Brien 02a0dd9763 Refactor to extract update() function 2025-03-22 13:30:08 +00:00
Camden Dixie O'Brien 001b52d714 Set to standard 'beginner' configuration 2025-03-22 13:30:08 +00:00
Camden Dixie O'Brien 7f2a9b79ae Run 1000 times and measure success rate 2025-03-22 13:30:08 +00:00
Camden Dixie O'Brien 027fea745d Keep track of total mines and total unknowns 2025-03-22 13:30:08 +00:00
Camden Dixie O'Brien b9fda50c95 Never probe known mines 2025-03-22 13:30:08 +00:00
Camden Dixie O'Brien e33c64e5ae Restart update after identifying mine 2025-03-22 13:30:08 +00:00
Camden Dixie O'Brien 6394dcb819 Probe known-safe tiles 2025-03-22 13:30:08 +00:00
Camden Dixie O'Brien e36c1c6502 Guess and update in a loop 2025-03-22 13:30:08 +00:00
Camden Dixie O'Brien eeea09eaa2 Identify mines on edges 2025-03-22 13:30:08 +00:00
Camden Dixie O'Brien cdf4ccc1a9 Create countadj helper function 2025-03-22 13:30:08 +00:00
Camden Dixie O'Brien 01d5376f31 Pick an initial point at random 2025-03-22 13:30:08 +00:00
Camden Dixie O'Brien 78c0ad81e2 Implement probes 2025-03-22 13:30:07 +00:00
Camden Dixie O'Brien cf84ae2017 Set up solve state 2025-03-22 13:29:53 +00:00
Camden Dixie O'Brien 302314ee79 Write Makefile 2025-03-22 13:29:53 +00:00
Camden Dixie O'Brien 0561639aa6 Implement puzzle generation 2025-03-22 13:29:51 +00:00
Camden Dixie O'Brien 540a47c37b Add license, .gitignore and .clang-format 2025-03-06 20:33:31 +00:00