I am interested in finding out if there is any specific way (algorithm) to play solitaire (not the card game)
I'm not familiar with formal algorithms, but there are certainly effective strategies. For the type of solitaire you picture there (along with all other "hop to remove" solitaires), my typical strategy is "avoid the corners"... Given a board like yours:
o * o * * * o * @ @ @ * o * * @ @ @ * * o * @ @ @ * o * * * o * o
... I will move the pieces out of the spots marked with
o as soon as possible, and will never move a piece back into them unless I have a plan to move it back out. Additionally, the spots marked with
@ are gold, if you aim to keep your pieces there then your chances are pretty good. As a strategy it's fairly simplistic and doesn't guarantee a win (not to mention, it's hard to do), but I've won at least once or twice just trying to do that.
It's typically easier on the triangle layouts:
o * * * @ * * @ @ * o * * * o
o o * * * * @ * * @ @ * o * * * * * o o o
... that last one I've only ever seen once, and it's where I learned this strategy to begin with.