Skip to content

fzarasp/solitaire-solver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Solitaire Solver

Using BFS, IDS, A*, and Greedy algorithms to solve a solitaire with numbers and colors.

This problem contains "k" columns. The maximum number is "n" and the number of colors is "m".

This program gives you a solution for the input problem.

I defined each type of search in different files and extra functions in the "Functions.py". I also defined a class named "Node" to store the the state of the problem.

This is an exmample with 5 columns, 3 colors, and 5 numbers. I chose greedy algorithm which does not give me the best solution but it is almost faster than other. You go ahead and check others. ^___^

image

note: if you want to let a column empty just enter

image

..... image

It takes 27 steps to solve aforementioned problem. I did not bring all the solution but as you run the program you will get a complete instruction to solve your solitaire.

About

Using BFS, IDS, A*, and Greedy algorithms to solve a solitaire with numbers and colors

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages