Do not follow this link

~zamfofex/snakebird-bfs-bfs

a Snakebird solver
fix program name in error reporting
use binary search (with indirection) instead of linear search
change argument handling slightly

refs

main
browse  log 

clone

read-only
https://git.sr.ht/~zamfofex/snakebird-bfs-bfs
read/write
git@git.sr.ht:~zamfofex/snakebird-bfs-bfs

You can also use your local clone with git send-email.

#Snakebird Best-First Search Brute-Force Solver

Snakebird BFS BFS is a solver for Snakebird, a puzzle game by Noumenon Games.

You can watch a demo on asciinema: https://asciinema.org/a/647202

It is fairly simple, but it’s capable enough. It doesn’t always find the most efficient solution in terms of move count, but if it finds a solution, it should always be valid. The solution is printed to stdout.

It might take too long to find a solution to certain levels. It might be useful to change the distance heuristic to favor nodes at lower depths or use hash tables instead of binary search.

Teleporters are not implemented yet.

#compiling

Replace cc with your preferred C compiler, feel free to adjust the flags as necessary.

cc -ansi -march=native -O3 -o solve main.c

#usage

The game’s levels are available in the levels directory. After compiling an executable as above, you may type e.g. the following to solve level 2.

./solve levels/2.txt

The format for levels should be self-explanatory by looking at the given levels.

#license

AGPL (v3 or later) © zamfofex 2024

Do not follow this link