Solver for netwalk, reading in image files of game state,
- Game currently unsolvable at the expert level
- Having exhausted all guidance in the tutorial, I'm open to adding new solver logic if I get suggestions or bright ideas
- Having tried to solve the partly solved game state (see
data/lgo_netwalk_example_game_expert_part_solved.png) the only route I can see is to see whether taking arbitrary decisions sets off a 'chain reaction' of tile solving (as is ensured to happen at easy and intermediate difficulty levels). - Having attempted this manually, I've noted that when setting
fix_connection(a), it's crucial to supply as many possible values to theadirection vector as there are connections possible on a tile (e.g. freezing the0,0[corner wire] tile in the above example usinga=[0,3]will initiate a chain reaction whereas simplya=[0]ora=[3]will lead to errors, as it effectively puts the game 'out of sync'). - It's not immediately clear however whether this approach will lead to full solutions - however I suspect trying it with the tiles with the maximum number of connections (i.e. the T-wires) bordering an already solved region will be most likely to produce a full solution state...
- This however is dependent on already having a solved region from the initial solve step, which appears to be the minority of generated game states at expert level!
- Solver now works for the easier game format, where there are blank tiles on the grid periphery
- Solver now works for the medium game format (for the one game I tried, uncertain if it will solve all)
- Solver for the expert level is under development...
- Solver can now display the results by rotating the tiles of the input image
- terminology for components etc. as in De Biasi 2012*
* A couple of exceptions:
- N.B. the power unit shown in the figure here [from a paper] has two outputs, whereas the one coded for in this library has from one to three, in line with the game at this link
python -im netwalkfrom .imaging import give_me_the_tiles(orshow_me_the_solved_tilesto open a viewer)
python -c "from netwalk import imaging; imaging.show_me_the_solved_tiles()"- (There's no full [expert level] solving functionality yet but will add a proper CLI interface when there is)
- write tests for all components
- give all wire components
onstates- check this hasn't broken any tests
- give all wire components
- use relative data path rather than hardcoded
- read in image file and parse tiling/component state
- detect output directions of component wiring and add to component state
- write tests for imaging and tiling
- add to the tile initialisation:
- a 'solved' property per tile
- a 'fixed' vector per component output direction
- an 'avoid' vector per tile [maximum length = 4 - number of output directions]
- add methods that modify these attributes per tile over the tileset
- implement an interface list with methods to access both tiles across an interface
- implement tile level
check_solvable,solve,check_solved,set_fixed, andset_avoidmethods - add a series of solvers for a tile which can be run in succession as applicable
- just implemented a single class in
solve_tilein the end with logical checks
- just implemented a single class in
- add further solvers until the expert level can be solved
- calculate and display tile rotations
- apply the rotations to the input image and display a solved form on screen
- add a command to automatically save a game solution to the data directory based on its input filename










