Giter VIP home page Giter VIP logo

fa21-202-odin's Introduction

Odin - Search Algorithms Visualizer

Topic

  • Interactive Application with Processing and Java

Team Members

  • Rounak Salim
  • Aidan Jones
  • Daniel Yeung
  • Hussein Adams

Areas of Contributions

  • Hussein Adams

    • Developed keyboard handler using observer pattern.
    • Developed click handler using chain of responsibility pattern.
    • Developed UI nested views and managed drawing on display using Composite pattern.
    • Developed and owned the UI component (Grid, Control Panel, Buttons, Labels)
    • Fixed numerous feature integration and UI bugs.
    • Created UI wireframe.
  • Rounak Salim

    • Developed the search algorithm strategy pattern.
    • Developed the BFS and DFS search algorithms.
    • Kept track of velocity and burn down rate.
  • Aidan Jones

    • Developed the state pattern.
    • Developed Dijkstra's search algorithm.
    • Created the overall architecture diagram.
  • Daniel Yeung

    • Developed the command pattern to assign functionality to buttons and labels.

Project Summary

The project goal is to develop a search algorithm visualizer application using the processing framework. It provides several search algorithms BFS, DFS and Dijkstra. By triggering the application, it will search with different paths from the starting cell until reaching the ending cell through traveling the grids. Hence, user can easily understand different algorithms' logic by watching the visualized processing paths.

Architecture

High Level Architecture Without Software Interfaces

architecture without interfaces

Architecture With Software Interfaces

architecture with interfaces

Features Summary

Display

  • A grid to show search state (visited, empty, obstacle, start, end)
  • A controls panel that will contain buttons and labels.

User Input

  • User can draw obstacles on grid
  • User can click on buttons to control search state

Search Algorithms

  • Supports multiple algorithms with ability to add new ones easily.

Links

Journals

Setup

  • Processing is required to run the project
  • Processing-java is also required
    • Open Processing
    • Click on Tools -> install processing-java

Running the application

processing-java --force "--sketch=<path to/fa21-202-odin/main/>" "--output=<path to/fa21-202-odin/main/out>" --run

UI Design

UI Wireframe

alt text

Meeting Notes

November 14th, 2021

  • Project proposal:

  • Proposed technologies: Processing, Java

  • Suggested algorithms to implement:

    • BFS, DFS, Dijkstra’s (strategy pattern?)
    • Adding new algos should be easy
  • Patterns that can be used in the project:

    • Strategy pattern for different search algorithms
    • State pattern to indicate current state of search
    • Possibly observer for displaying the animation
    • Possibly command pattern for menu items to select search
  • XP core values

    • Aidan: Communication
    • Hussein: Respect
    • Rounak: Simplicity
    • Daniel: Feedback

November 18th, 2021

  • Rounak to build a barebone project and push it by eod
  • Aidan to look into search algorithms (Dijkstra’s) algorithm
  • Hussein to also research how to import custom java classes into .pde files
  • Design meeting after we set up a barebone project.

November 23rd, 2021

  • Hussein to draw UI wireframe
  • Aiden to draw architecture diagrams
  • Meet on Dec 3rd to record demo
  • Hussein to record 1 minute user story
  • Everyone to work on slides and finish them before Dec 3rd
  • Final bug fixing and feature integration work

fa21-202-odin's People

Contributors

haadams avatar aidanrjones avatar rounaksalim95 avatar danielsjsu avatar paulnguyen avatar

Stargazers

Azamat Salamatov avatar  avatar

Watchers

James Cloos avatar  avatar  avatar  avatar

Forkers

asalamatov

fa21-202-odin's Issues

Use Composite pattern to manage nested views

The main screen will have two views under it, the grid and the control panel. Moreover, the control panel will have multiple views nested in such as buttons and dropdown menus. We'll use the composite pattern to handle these views.

Manage drawing while algorithm is running

We allow the user to draw walls that the search algorithm will have to navigate around to go from start to finish. Currently, the user is allowed to draw while the algorithm is running. However, currently, the walls drawn during the search animation are not taken into account by the search algorithm and the algorithm would just bypass them.

We have 2 options to deal with them.

  1. Disable drawing during animation.
  2. Make the search algorithm consider anything added while it is running if it is in its new path.

Add Controls Buttons

We need to add controls buttons to the control pane to control which search algorithm to run.

Add control panel to the display

We need space to add buttons to control the grid. We'll just split the screen into two parts, the grid will occupy > 2/3 of the display, and the control panel will occupy < 1/3 of the window. The control panel will be placed on the right side while the grid will be on the left.

Fix animation issue for search visualization

Currently, the search algorithm colors all the grids at once. This doesn't showcase the visualization path properly.
One workaround is to tweak the search algorithms so that they only perform one step at a time, and the search function can be called iteratively from the draw() function after a fixed interval.

Note: I tried putting the search thread to sleep, but that doesn't seem to be working - probably because of the way Processing is handling all these files under the hood?

BONUS ITEM: Snake game

We have all the tools needed to make a snake game out of this project. We got the grid and the controls. We just need to implement it.

So, as a bonus item, someone could try to play around with implementing the snake game or a simplified version of it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.