Skip to content

Conversation

UditNayak
Copy link

Issue: #1155 - Add Animations for Search Algorithms

Context:

This PR introduces animations for search algorithms, enhancing the user experience by providing a visual understanding of the algorithm's progression.

Changes Introduced:

  1. Animation Components:

    • Developed an AnimateProblem class to handle animations for various search algorithms.
    • Implemented methods for generating random lines, calculating straight-line distances, and transposing matrices.
  2. Integration with Search Algorithms:

    • Integrated the AnimateProblem class with different search algorithms such as A*, Weighted A*, BFS, DFS, UCS, and Best-First Search.
    • Utilized a dictionary to define the solvers and their corresponding f-value functions.
  3. User Interface and Visualization:

    • Created a matplotlib figure for displaying the animations.
    • Added visual indicators for obstacles, explored nodes, the current node, the initial state, and the goal state.
  4. Performance Optimizations:

    • Optimized the animation rendering to ensure smooth performance.
    • Minimized potential lag by efficiently handling the exploration and plotting of nodes.

weasdown added a commit to weasdown/aima-python that referenced this pull request Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant