![]() It’s mentally stimulating, for sure, but it’s way more fun than the stressful screenshot above may suggest. ![]() There’s no prerequisite required to play SpaceChem- you don’t need a college degree to enjoy the game. SpaceChem offers truly challenging puzzles that require you to perfect your skills in programming and circuitry, but solutions never feel hidden or unfair - they just require trial and error, like any scientific enterprise. Though it is not able to solve any given puzzle, the program can handle most puzzles of varying size (3x3, 4x4, 5x5, etc.).Many puzzle game challenges tend to be somewhat unfair, with leaps in logic that are designed to be nearly unsolvable. This causes some repetition in movement, but ultimately was necessary. The function occassionally needs to forcibly make a move when an optimal move cannot be found to ensure the program doesn't stop prematurely. The program continues to pick tiles using Manhattan Distance, keeping track of its last move so as not to repeat. The program works by calculating the Manhattan Distance of the tiles surrounding the empty tile and making the optimal move, optimal being whichever move brings a tile closest to its home position on the board. We decided to move in favor of a greedy algorithm, making use of the Manhattan Distance calculation to move tiles. The original method used a tree to store board states, but the constant addition of nodes was very memory-intensive and eventually crashed. The initial goal of the project was to create a slider puzzle generator and solver using an A-star search algorithm. A slider puzzle generator and solver written in C++
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |