Polygon-Puzzle
Posted: Thu Mar 06, 2008 11:01 pm
Ok, I think its good not to spam in the old puzzle-suggestion-forum.
The idea behind the puzzle is, that one has to arrange a set of little polygons, so that it fits in one big polygon. The detailed description can do some native-english-speaking one.
The questions which have to be answered before we can start to write a puzzle-generator are the following:
1) Which format shall the puzzle-description have got?
2) Which format shall the string containing the solution have got?
3) How complicated should the polygons be?
4) How complicated should the rules be?
to 1)
I think, we could give coordinates in an co-ordinate system, starting at P(0; 0). Then we give the next points, and by rule we decide, that always two consecutiv points and the last and the first point have to be connected. (0;0) (10;5) (10;0) will be a rectangular triangle, and (0;0) (10;5) (5;5) (10;0) a wired rectangle. The same system we could apply to the smaller polygons. In this way, we can could number the corners in order to identify them.
to 2)
No idea, I am sorry.
to 3)
I think we should avoid angular (not horizontal, not vertical) lines, in order to avoid floating numbers. I dont know whats your opinion, but since computers cannot save infinite exact floating numbers (eg 0.1, sqrt(2), ...) we should avoid them imho. Leaving this alone, I dont see any reason to restrict the number of corners, the shape of the polygons or the number of pieces. Maybe its hard to write a solving/creating-algorhythm, but that doesnt count.
4)
In which steps will we rotate the pieces? According to my suggestion of avoiding angulars, we should rotate in steps of 90 degree. I also think, we could mirror the pieces. This could make levels more hard in the end.
Puzzle-generation:
I'm really bad in those kind of things, but what about a easy way:
We create a random polygon. For this we can use some generator for random numbers to generate the coordinates of the polygon (just the x- or y-coordinate of the old point is not allowed to change).
Then, we decide for some "cutting-lines" on the x- and y-axis. Now we just have to calculate, where these lines meet each other and the polygon, and we will have a lot of rectangles and maybe something more.
Of course it is possible to make it more complicated, so we would have a pentagon, hexagon or whatever.
So now I would be glad to know your opinion.
regards
der Maxist
The idea behind the puzzle is, that one has to arrange a set of little polygons, so that it fits in one big polygon. The detailed description can do some native-english-speaking one.
The questions which have to be answered before we can start to write a puzzle-generator are the following:
1) Which format shall the puzzle-description have got?
2) Which format shall the string containing the solution have got?
3) How complicated should the polygons be?
4) How complicated should the rules be?
to 1)
I think, we could give coordinates in an co-ordinate system, starting at P(0; 0). Then we give the next points, and by rule we decide, that always two consecutiv points and the last and the first point have to be connected. (0;0) (10;5) (10;0) will be a rectangular triangle, and (0;0) (10;5) (5;5) (10;0) a wired rectangle. The same system we could apply to the smaller polygons. In this way, we can could number the corners in order to identify them.
to 2)
No idea, I am sorry.
to 3)
I think we should avoid angular (not horizontal, not vertical) lines, in order to avoid floating numbers. I dont know whats your opinion, but since computers cannot save infinite exact floating numbers (eg 0.1, sqrt(2), ...) we should avoid them imho. Leaving this alone, I dont see any reason to restrict the number of corners, the shape of the polygons or the number of pieces. Maybe its hard to write a solving/creating-algorhythm, but that doesnt count.
4)
In which steps will we rotate the pieces? According to my suggestion of avoiding angulars, we should rotate in steps of 90 degree. I also think, we could mirror the pieces. This could make levels more hard in the end.
Puzzle-generation:
I'm really bad in those kind of things, but what about a easy way:
We create a random polygon. For this we can use some generator for random numbers to generate the coordinates of the polygon (just the x- or y-coordinate of the old point is not allowed to change).
Then, we decide for some "cutting-lines" on the x- and y-axis. Now we just have to calculate, where these lines meet each other and the polygon, and we will have a lot of rectangles and maybe something more.
Of course it is possible to make it more complicated, so we would have a pentagon, hexagon or whatever.
So now I would be glad to know your opinion.
regards
der Maxist