Path-Finding-using-Qlearning

It was a maze creator and solver simulator designed in Matlab. You can create a maze and let the Q learning to solve it. • First of extract the file in matlab folder. • Open matlab by right clicking on matlab icon and selecting “run as administrator”. • Open “maze_solver_qlearning.m” and run it. • If it ask for an add folder than click on “add path” • The following will be opened

image

• Slide the slider up and down the value of alpha will appear above slider. My suggestion is keep the slider value above 0.7 or on one because for low value the solution sometime stuck due to divergence.

image image

• Click on load maze and select maze.mat from extracted folder it will load a maze.

image image image

• Click on run and it will start solving until reset button is pressed. • Here is the solution which they give

image

• For creating maze click on Reset to stop processing and click on create maze. Which will open the new window like the following.

image

Where you have to create your own maze by specifying paths from r1, c1 to r12, c12 like in the following image.

image

Where tick shows the paths, click on Save Maze, save as maze123.mat, and close the window. Then click on load maze in the first window and select maze123.mat

image

Click on run

image

In addition, random maze create maze for yours but I will not prefer because in most of cases it will never give you open path between start and end.