Check out Atomic Chess, our featured variant for November, 2024.


[ Help | Earliest Comments | Latest Comments ]
[ List All Subjects of Discussion | Create New Subject of Discussion ]
[ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]

Single Comment

Capablanca Random Chess. Randomized setup for Capablanca chess. (10x8, Cells: 80) [All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Sun, Feb 27, 2005 08:12 PM UTC:
I'm working on a Game Courier preset for this game, but I've hit a snag. So far, I have code that creates a random position, and I have code for checking whether all Pawns are protected, and I can also check the Levenshtein distance between a given setup and Gothic Chess. The problem is that PHP, which Game Courier is written in, gives it only 30 seconds to find a valid setup, and in each test, it has run out of time before finding one. So what I need is some shortcut for either selecting valid setups or screening out invalid ones. What might be ideal is to have a database of valid setups, each keyed to a single number, and then Game Courier could just pick a single random number, fetch the corresponding setup, and skip the tedious iterative process of randomly placing pieces until a valid setup is found. Another possibility would be to filter out a number of bad setups with wildcard filters, which would be faster than checking whether each Pawn is defended, but it would require appropriate filters. Does anyone have anything I could use without having to do all the preparation work myself?