Repository navigation
Conversation
…tion It wraps a problem like InstrumentedProblem and turns the run into steps (state expanded, frontier, explored, and the path found), so that a search can be replayed without changing the search functions.
…gets The views are SVG in an HTML widget, timed by a Play widget in the browser, so they run in Jupyter and in JupyterLite with no other widget library: a player for a search on the Romania map, one for the 8-puzzle solution with sliding tiles, one for n-queens, and an 8-puzzle the user solves by clicking.
build.sh bundles the ipywidgets wheels so that the notebook works offline, and verify_browser.py --lab runs a notebook in the JupyterLite app, presses the player buttons, clicks the 8-puzzle tiles and saves screenshots.
Larger tiles with bold numbers, a light blank square, the tiles that can move outlined on hover, and a one-line status.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
this adds interactive pictures of the search algorithms that run in the browser, also in the JupyterLite companion
aima/widgets.py has a step-through player (Play, Step, Reset, a slider and the speed) built on ipywidgets only, with views for the Romania map (frontier, explored, current city, final path and cost), the 8-puzzle (tiles sliding) and n-queens
there is also an 8-puzzle to solve by clicking the tiles, which at the end compares your moves with the optimum found by A*
the search functions are unchanged: RecordingProblem in search.py wraps the problem and records the expansions, and the player replays them
to try it: cd lite && ./build.sh, serve lite/_output and open search.ipynb
python verify_browser.py --lab search runs that notebook in the JupyterLite app and clicks through the widgets