AlgoQuest is an educational tool designed to help students, educators, and programming enthusiasts understand how algorithms work through interactive visualizations. Watch algorithms execute step-by-step, control playback speed, and see exactly how data structures change during execution.
- ๐ Searching Algorithms: Binary Search, Linear Search, Jump Search
- ๐ Sorting Algorithms: Bubble Sort, Selection Sort, Insertion Sort, Merge Sort, Quick Sort, Heap Sort
- ๐ณ Graph Algorithms: BFS, DFS, Dijkstra's Algorithm, Prim's Algorithm, Kruskal's Algorithm
- ๐งฉ Puzzle Solvers: N-Queens, Sudoku, Maze Generation and Solving
- ๐ Pathfinding: A* Search, Best-First Search
- ๐ฌ Step-by-Step Visualization: Watch algorithms execute one step at a time
- โฏ๏ธ Playback Controls: Play, Pause, Step Forward, Step Backward
- โก Adjustable Speed: Control animation speed with an intuitive slider
- ๐ Multiple Visualizations: Bar charts, arrays, graphs, grids, and chessboards
- ๐ Variable Tracking: Monitor algorithm variables in real-time
- ๐ป Code Display: View algorithm pseudocode alongside visualization
- ๐จ Clean UI: Modern JavaFX interface with intuitive controls
- ๐ฆ Standalone Executable: Includes embedded JREโno Java installation required
- Java Development Kit (JDK) 11 or higher - Download here
- Apache Maven 3.6+ - Download here
run.batchmod +x run.sh
./run.sh# Compile the project
mvn clean compile
# Run the application
mvn javafx:runIf you have the pre-built AlgoQuest.exe:
- Double-click
AlgoQuest.exe - No Java installation requiredโJRE is embedded!
# Standard JAR (requires JavaFX on system)
mvn clean package
# Shaded JAR (includes all dependencies)
mvn clean packageOutput: target/algorithm-visualizer-1.0.0.jar
-
Build the shaded JAR:
mvn clean package
-
Use Launch4j:
- Install Launch4j
- Open
PrashnaSetu.xmlin Launch4j - Click "Build wrapper" to generate
AlgoQuest.exe
-
Package for distribution:
- Include
AlgoQuest.exe - Include
jre/directory (embedded JRE) - Include
openjfx-21.0.7_windows-x64_bin-sdk/(JavaFX SDK)
- Include
- Launch the application
- Browse the algorithm list by category
- Click on an algorithm to open its visualization
- Set input size, target values, or other algorithm-specific parameters
- Click "Generate" or "Start" to initialize
โถ๏ธ Play: Auto-advance through algorithm steps- โธ๏ธ Pause: Pause automatic playback
- โญ๏ธ Step: Advance one step forward
- โฎ๏ธ Step Back: Go back one step
- ๐ Reset: Return to initial state
- Use the speed slider to control animation speed
- Slower speeds help understand complex operations
- Faster speeds good for observing overall behavior
- Visualization Area: Watch the algorithm in action
- Progress Log: Read textual descriptions of each step
- Variable List: Track variable values during execution
- Code Display: View the algorithm's pseudocode
algorithm-visualizer/
โโโ src/main/
โ โโโ java/com/algorithmvisualizer/
โ โ โโโ Main.java # Application entry point
โ โ โโโ algorithm/ # Algorithm implementations
โ โ โ โโโ BinarySearchSolver.java
โ โ โ โโโ BubbleSortSolver.java
โ โ โ โโโ DFSSolver.java
โ โ โ โโโ ...
โ โ โโโ model/ # Algorithm metadata
โ โ โ โโโ Algorithm.java # Abstract base class
โ โ โ โโโ BinarySearchAlgorithm.java
โ โ โ โโโ ...
โ โ โโโ ui/ # UI controllers
โ โ โ โโโ MainController.java
โ โ โ โโโ AlgorithmViewController.java
โ โ โ โโโ ...
โ โ โโโ visualization/ # Renderers
โ โ โโโ BarChartRenderer.java
โ โ โโโ GraphRenderer.java
โ โ โโโ ...
โ โโโ resources/
โ โโโ fxml/ # UI layouts
โ โ โโโ main-view.fxml
โ โ โโโ algorithm-view-new.fxml
โ โ โโโ ...
โ โโโ Logo.png
โโโ jre/ # Embedded JRE (for distribution)
โโโ openjfx-21.0.7_windows-x64_bin-sdk/ # JavaFX SDK (for distribution)
โโโ pom.xml # Maven configuration
โโโ PrashnaSetu.xml # Launch4j configuration
โโโ run.bat # Windows run script
โโโ run.sh # Unix/Linux run script
โโโ README.md # This file
- Language: Java 11
- UI Framework: JavaFX 17.0.2
- Build Tool: Apache Maven
- Packaging: Launch4j (Windows executable creation)
- Architecture: Model-View-Controller (MVC)
We welcome contributions! Whether it's adding new algorithms, improving visualizations, or fixing bugs, your help is appreciated.
-
Create Algorithm Model (
model/[Name]Algorithm.java):public class NewAlgorithm extends Algorithm { public NewAlgorithm() { super("Algorithm Name", "Description", Category.SORTING); } @Override public String getVisualizationFxml() { return "/fxml/newalgorithm-view.fxml"; } @Override public Class<?> getControllerClass() { return NewAlgorithmController.class; } }
-
Implement Algorithm Logic (
algorithm/[Name]Solver.java):public class NewAlgorithmSolver { public List<StepData> solve(Parameters params) { // Your algorithm implementation } }
-
Create Controller (
ui/[Name]Controller.java):- Implement
AlgorithmViewController.AlgorithmSpecificController - Handle parameter input and visualization updates
- Implement
-
Create or Reuse Renderer (
visualization/[Name]Renderer.java):- Render algorithm state to JavaFX Canvas or Pane
-
Create FXML View (
resources/fxml/[name]-view.fxml):- Link to your controller
-
Register Algorithm:
- Add to
MainController.getAlgorithms()method
- Add to
For detailed contribution guidelines, see AI_AGENT_ONBOARDING.md.
- AI Agent Onboarding Guide: Comprehensive developer documentation
- JavaDoc: API documentation (generated via
mvn javadoc:javadoc)
- No automated tests currently exist
- Code display feature is not fully implemented for all algorithms
- Step-back functionality may have issues with certain puzzle algorithms
- Linux/Mac executable not available (currently Windows only via Launch4j)
- Add automated tests (JUnit)
- Implement complete code display for all algorithms
- Add dark mode theme
- Export visualization as video/GIF
- Linux and macOS native packages
- Enhanced graph algorithm visualizations
- Tutorial mode for beginners
- Algorithm comparison mode
- Dynamic programming visualizations
- String matching algorithms
- Tree traversal animations
- Interactive parameter tuning
- Performance metrics display
- Multi-language support (i18n)
- Web-based version
Currently, the project lacks automated tests. To test manually:
- Run the application:
mvn javafx:run - Test each algorithm category:
- Select an algorithm
- Configure parameters
- Verify visualization renders correctly
- Test all playback controls (Play, Pause, Step, Step Back, Reset)
- Adjust speed and verify responsiveness
- Check edge cases:
- Minimum input size
- Maximum input size
- Already sorted arrays (for sorting algorithms)
- Graph with cycles vs. acyclic graphs
- Start with Simple Algorithms: Begin with Binary Search or Selection Sort
- Use Step-by-Step Mode: Pause and discuss each step with students
- Vary Input Sizes: Show how algorithm behavior changes with data size
- Compare Algorithms: Demonstrate different approaches to the same problem
- Encourage Exploration: Let students adjust parameters and observe results
- Built with โค๏ธ using JavaFX
- Icons and UI inspired by modern design principles
- Educational content based on standard computer science curriculum
This project is licensed under the MIT License - see the LICENSE file for details.
- Issues: Report bugs or request features via GitHub Issues
- Discussions: Join conversations in GitHub Discussions
- Email: [Your contact email]
If you find this project helpful, please consider giving it a โญ on GitHub!
Made with ๐ง for algorithm enthusiasts
