| changeset 754: | d39e613e8266 |
| author: | Gregor (codu.org) |
| date: | Mon Jan 03 22:11:26 2011 +0000 (16 months ago) |
| permissions: | -rwxr-xr-x |
| description: | medit/bin/N-in-a-row game chebang=#!/usr/bin/env .wiki cont=This is an idea for a game which: * Is entirely non-random * Has no hidden information * Involves strategy * Is playable by normal humans * Has an infinite state-space * Is hopefully fun * Is generally unsolvable ** Although it may be solvable when restricted to "reasonable" board sizes The basic idea is: * The gameboard is an infinite grid * One player starts by placing a single X anywhere * The second player must get two Os in a row within f(1) turns (f to be defined) * Generally, if you get N in a row, then the opponent has f(N) turns to get N+1 in a row or you win. Then it repeats when they have N+1 * You can also get N+1 in a row yourself, in which case the counter resets with you still in the winning position. Open questions: * What is f? * Can you place your symbol anywhere, or only next to the existing game? Of course, the most vital part is the definition of f, and we're not yet sure what to do with that. |
1#!/usr/bin/env .wiki2Arrow-based automation game (this sounds like the title of a patent)4==Basic Blocks==6Basic blocks can be one of many colors, and have arrows pointing in one of the four directions. All adjacent blocks of the same color connect and act as a group.8==Movement==10The basic action a group will perform in each step of the simulation is for the entire group to move as one.12===Possible Methods===14Vector addition: To determine which direction to move, the vectors describing each of the arrows are summed, and the group moves in the direction defined by the greatest dimension of the resultant vector.16Voting: Within a group, the number of blocks pointing in each direction is summed. Then, the direction receiving the most votes is the direction that the group moves. Any direction that would move the group off the playing field is disqualified.18(Both methods are capable of producing ties. In the event of a tie, one tie-breaking method could be to randomize the choice among the winning directions.)20==Attack==22If a group's movement is blocked (any of the individuals are blocked), energy is stolen from the blocking group wherever the first group has arrows pointing at the blocking group.24==Energy==26Each block has an energy store, a value between 0 and 50 (or something). A block with 0 energy dies (leaving an empty cell), and a block with more than 25 energy will give energy to neighboring blocks in the same group. Every time a block successfully moves, it loses one energy.28==Special Blocks==30Special blocks will be rare, making less than 10% of your supply, but will be necessary for more advanced behavior.32===Flipper===34An arrow which reverses direction when the group is blocked. Both horizontal and vertical flippers exist.36===Rotator===38An arrow which rotates its direction when the group is blocked. There is a clockwise rotator and a counter-clockwise rotator.39(Note, it would be possible to build a flipper with two of these, so the flipper may be unnecessary)41===Retreat Block===43This block has an arrow, but the arrow is normally dim and does not participate in the voting process. When a block in the group has low energy, the arrow activates.45===Energy Push Block===47This block will inject energy into a group it collides with if its arrow is pointing at that group.49===Aggressive Block===51This block will point toward any opponent's group upon collision.53===Cowardly Block===55This block will point away from any opponent's group upon collision.57===Friendly Block===59This block will point toward any group of the same side upon collision.61===Rude Block===63This block will point away from any group of the same side upon collision.65==Update Rule==67Performing an iteration is fairly complicated. It involves these steps:69* Determine the direction each group is moving.70* Check if each group conflicts with the //initial// position of any group that is not moving in the same direction. If it is, it's blocked, and the blocks which conflict will steal energy as appropriate.71* If the group does not have an initial conflict, mark the locations for each group that the blocks will ideally move to (which is their initial location if the group is already blocked). Any location with two or more blocks marked is a conflict, and all relevant groups are blocked from moving. If the blocks in question point towards the cell with the conflict, energy is stolen.72* If any conflicts were found in this iteration, redo the previous step.73* Perform the update.