Peg solitaire plus solution12/21/2023 So if you can see if there's a pattern to solving squares, and apply that to your solver, that's probably the best way to go. The 15-hole triangular variant is commonly found in Cracker Barrel restaurants in the US. Does it work with 4x4? And how do you put that into rules? Brute force is really going to be a nightmare. Peg solitaire is a singleplayer board game with the objective to remove all game pieces (pegs or marbles) except one from the board by jumping them with another peg. Figure out the pattern for solving a square of even and odd sides. I can see, that but basically, that's what I think you need to do. I'd advise you just work around the edge, if that's even possible. You can go there if you really want to, and if you can figure how to stretch pieces that far. Consider:Įverything outside of the frame of 0s in all directions is infinity. You probably need to figure out if with even or odd sides, if that matters. You basically need to figure out if there is a set pattern to take with a square, which will solve it. (if we get here step 4 produced a undesired board state) undo the move made in step 4 and recall step 4 with the next possible move that peg. Find the first possible peg that can move in 1 or more directions call solve () for that peg and it's direction. In the United Kingdom the game is referred to as Solitaire while the card games are called Patience. Check if there is a still a peg that can be moved, if there isn't one exit the function. You're going to have to figure out rules which you can use to cull possible moves. Peg solitaire (or Solo Noble) is a single player board game involving movement of pegs on a board with holes. You're supposed to write a solve for an arbitrary number of pieces, on an infinite board (meaning you can wander off in any direction)? Did you even read the Wiki link? On a + board, with a piece missing, there are a massive number of possible moves to figure out (3 million). If I'm reading your original post again right, you're screwed.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |