-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ca7ed6a
commit 80100fd
Showing
8 changed files
with
146 additions
and
101 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
88 changes: 59 additions & 29 deletions
88
src/apps/path-finder/components/modal-icon/modal-content.tsx
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,94 +1,124 @@ | ||
export const modelContent1 = [ | ||
export const mazeAlgoInfo = [ | ||
{ | ||
id: 1, | ||
heading: "Prim's Algorithm", | ||
content: ` | ||
Prim's algorithm is a greedy algorithm that finds a minimum spanning tree for a weighted undirected graph. | ||
The algorithm starts from an arbitrary vertex and grows the minimum spanning tree one edge at a time, always choosing the cheapest edge that connects a vertex in the tree to a vertex outside the tree. | ||
It continues this process until all vertices are included in the minimum spanning tree. | ||
Prim's algorithm is a greedy algorithm & works on spanning tree generation technique. | ||
It creates the maze by starting with a random cell and adding the nearest cell to the current set of cells. | ||
`, | ||
}, | ||
{ | ||
id: 2, | ||
heading: "Kruskal's Algorithm", | ||
content: ` | ||
Kruskal's algorithm is another greedy algorithm for finding a minimum spanning tree in a connected weighted graph. | ||
It operates by sorting all the edges in increasing order of their weights and then repeatedly adding the smallest edge to the spanning tree, provided that adding the edge does not create a cycle. | ||
It continues this process until all vertices are connected, forming a minimum spanning tree. | ||
Kruskal's algorithm is a greedy algorithm & works on spanning tree generation technique. | ||
It creates the maze by choosing random edges to connect in the entire grid provided that adding the edge does not create a cycle. | ||
`, | ||
}, | ||
{ | ||
id: 3, | ||
heading: 'Recursive backtracking', | ||
content: ` | ||
Recursive backtracking is a powerful algorithmic technique commonly used to solve problems involving exploring all possible combinations or configurations of a problem space. It is particularly well-suited for solving problems such as maze generation, Sudoku puzzles, N-queens problems, and more. | ||
Recursive backtracking is a technique commonly used to generate mazes. | ||
It works by recursively exploring the grid and backtracking when a dead end is reached. | ||
This technique often results in mazes with long, winding corridors and a single path from the start to the finish. | ||
`, | ||
}, | ||
{ | ||
id: 4, | ||
heading: 'Recursive division', | ||
content: ` | ||
Recursive division is a technique commonly used to generate mazes. | ||
It works by recursively dividing a region into smaller subregions until certain criteria are met. | ||
This method results in mazes with long straight walls crossing their space, making it easier to see which areas to avoid.', | ||
`, | ||
}, | ||
{ | ||
id: 5, | ||
heading: 'Wilson algorithm', | ||
content: ` | ||
Wilson's algorithm typically refers to a maze generation algorithm named after David Wilson, a mathematician known for his work in probability theory and combinatorics. Wilson's algorithm is a randomized algorithm used to generate a maze, and it's particularly interesting because it doesn't rely on recursive techniques like the recursive division method. | ||
Wilson's algorithm is a random maze generation algorithm. | ||
It creates the maze by performing a random walk until it reaches a cell that has already been visited. | ||
Then, it backtracks and adds the path to the visited cells. | ||
`, | ||
}, | ||
{ | ||
id: 5, | ||
heading: 'Recursive division', | ||
content: ` | ||
Recursive division is a technique commonly used to generate mazes. It works by recursively dividing a region into smaller subregions until certain criteria are met. This technique often results in mazes with long, winding corridors and a single path from the start to the finish. | ||
heading: 'Binary tree algorithm', | ||
content: ` | ||
The binary tree algorithm is a simple method for generating mazes. | ||
It works by dividing the grid into two halves and connecting cells in each half to create a maze. | ||
This method results in mazes with corridors that are either vertical or horizontal, depending on the orientation of the grid. | ||
`, | ||
}, | ||
{ | ||
id: 6, | ||
heading: ' Eller', | ||
heading: ' Ellers Algorithm', | ||
content: ` | ||
Eller's algorithm, also known as Eller's maze generation algorithm, is a method for generating mazes, named after its creator, J.A. Eller. Unlike some other maze generation algorithms such as recursive division or Prim's algorithm, Eller's algorithm works by iteratively generating one row of the maze at a time, which makes it particularly efficient in terms of memory usage. It's also notable for its ability to generate mazes with horizontal passages that span the entire width of the maze | ||
Eller's algorithm works by iteratively generating one row of the maze at a time, which makes it particularly efficient in terms of memory usage. | ||
It's also notable for its ability to generate mazes with horizontal passages that span the entire width of the maze. | ||
`, | ||
}, | ||
{ | ||
id: 7, | ||
heading: 'Sidewindern', | ||
heading: 'Sidewinder Algorithm', | ||
content: ` | ||
The Sidewinder algorithm is a relatively simple and efficient for generating mazes. | ||
It is named after the sidewinder snake due to the pattern it creates in the maze. | ||
The algorithm primarily works by carving passages either horizontally or vertically, resulting in a maze with a strong bias towards corridors that are mostly horizontal or mostly vertic`, | ||
}, | ||
{ | ||
id: 8, | ||
heading: 'Labyrinth Algorithm', | ||
content: ` | ||
The Labyrinth algorithm is a maze generation algorithm that works by creating a grid of cells and carving passages between them. | ||
It is a simple and efficient algorithm that can generate mazes of varying complexity. | ||
`, | ||
}, | ||
{ | ||
id: 9, | ||
heading: 'Random Algorithm', | ||
content: ` | ||
The Sidewinder algorithm is another method for generating mazes, which is relatively simple and efficient. It is named after the sidewinder snake due to the pattern it creates in the maze. The algorithm primarily works by carving passages either horizontally or vertically, resulting in a maze with a strong bias towards corridors that are mostly horizontal or mostly vertic | ||
The Random algorithm is a simple maze generation algorithm that works by randomly placing the walls in the grid. | ||
It is a quick and easy way to generate mazes of varying complexity. It does not guarantee that the maze will be solvable. | ||
`, | ||
}, | ||
]; | ||
|
||
export const modelContent2 = [ | ||
export const pathSearchAlgoInfo = [ | ||
{ | ||
id: 1, | ||
heading: 'Breadth-First Search (BFS)', | ||
content: ` | ||
Breadth-first search (BFS) is an algorithm for traversing or searching tree or graph data structures. | ||
It starts at the root node and explores all the neighbor nodes at the present depth prior to moving on to the nodes at the next depth level. | ||
This algorithm uses a queue data structure to keep track of nodes to be explored. | ||
Breadth-first search (BFS) algorithm that finds the shortest path between cells in a grid. | ||
It is an uninformed search algorithm that explores all the neighbor cells at the present depth prior to moving on to the cells at the next depth level. | ||
This algorithm uses a queue data structure to keep track of cells to be explored. | ||
`, | ||
}, | ||
{ | ||
id: 2, | ||
heading: 'Depth-First Search (DFS)', | ||
content: ` | ||
Depth-first search (DFS) is an algorithm for traversing or searching tree or graph data structures. | ||
It starts at the root node and explores as far as possible along each branch before backtracking. | ||
This algorithm uses a stack data structure to keep track of nodes to be explored. | ||
Depth-first search (DFS) algorithm that finds a path between cells in a grid but does not gaurantee the shortest path. | ||
It is an uninformed search algorithm that explores as far as possible along each branch before backtracking. | ||
It uses a stack data structure to keep track of cells to be explored. | ||
`, | ||
}, | ||
{ | ||
id: 3, | ||
heading: 'A* Search', | ||
content: ` | ||
A* search is an informed search algorithm that finds the shortest path between nodes in a graph. | ||
It evaluates nodes by combining the cost to reach the node with the estimated cost to reach the goal. | ||
A* uses a heuristic function to estimate the cost to reach the goal from a given node. | ||
A* search is an informed search algorithm that finds the shortest path between cells in a graph. | ||
It evaluates cells by combining the cost to reach the cell with the estimated cost to reach the goal. | ||
A* uses a heuristic function to estimate the cost to reach the goal from a given cell. | ||
`, | ||
}, | ||
{ | ||
id: 4, | ||
heading: 'Greedy Best-First Search', | ||
content: ` | ||
Greedy best-first search is an informed search algorithm that selects the node to expand based on an evaluation function. | ||
It prioritizes nodes based solely on the estimated cost to reach the goal from the current node. | ||
Unlike A*, greedy best-first search does not consider the actual cost to reach the current node. | ||
Greedy best-first search is an informed search algorithm that finds a path between cells in a grid but does not gaurantee the shortest path. | ||
It prioritizes cells based solely on the estimated cost to reach the goal from the current cell. | ||
`, | ||
}, | ||
]; |
This file contains 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
Oops, something went wrong.