Advertisement

Solve this problem (hard)

Started by April 24, 2003 08:17 PM
11 comments, last by Senses777 21 years, 9 months ago
Is that a question of if I can or cannot do that, or are you asking me to post a starting and finishing grid? I can do that, I have already posted a starting grid, and a finishing grid is blank. Unless you mean a screenshot?? .sen
"I want to make a simple MMORPG first" - Fenryl
quote:
Original post by valles
A particular strategy could be to be to connect all of the green "C"s together, and particularly concentrating on solving the blocks that are sitting all by their lonesome with no easy solution. It will be alot like the chess programs IBM made for "BIG BLUE".

It''s name was Deep Blue, and I don''t see how what you described has anything to do with it.

Advertisement
Solving any level given to you is hard, especially since there doesn''t need to exist a solution. If all you want is to give the user hint''s though, I ''ve got a better idea. I actually made a same game clone about a year ago with a couple of friends from uni for an entertainment web portal thingy, but it never got published. This is my idea for generating guaranteed solvable levels from that project (which sort of applies to your problem).

Each removal of blocks by the user can be seen as an operator in state space. Each of these operators has an inverse. If you start from the goal state (an empty board) and apply the inverse operators you''ll eventually end up with a full level with a recorded solution. You just use the list of applied operators but in the reverse order. Here are a few examples of inverse operators that were valid in our version of the same game:

* Add a column of block anywhere between two blocks, pushing the blocks above upwards, provided the blocks above don''t get pushed of the screen.

* Add a row of blocks (not just a full row, maybe just two or three blocks) between two existing rows, pushing the blocks above upwards, provided they don''t get pushed off the top of the playing field.

You need to add a bit more to cover columns moving when you clear a column completely and stuff like that but it should be pretty simple. By varying the size of the blockchunks you add, the number of different colors of blocks and the probability of splitting existing blockchunks you can get very different diffculty levels. If you generate your levels like this, every level can be cleared, you have the full solution to each level and you can easily give the user hints. Of course, if the user does bad moves in the beginning of the game, no hints may be available since it then might be imposible to clear the level.

If you really need an AI to solve arbitrary levels things get harder, let us know if that''s the case and I''ll give other ideas.

This topic is closed to new replies.

Advertisement