Comments/Ratings for a Single Item
Not entirely because on each turn the names of the players change alternately between White and Black.
Okay, this is now fixed. I switched from using $side, which changes depending on whose turn is being viewed, to $default["side"], which always reports the value of $side last entered into the log. That kept things fixed to let the code determine who is playing which side.
Great! We can now easily review again the large number of games of the GC database.
There is a bug with the time controls that is affecting games given 30 days spare time and 30 days extra time. I will look into this tomorrow or later in the week. In the meantime, I would suggest using different time controls or waiting until I fix this to play games with these time controls.
There might be nothing to fix. My examination of the log for our game reveals that $maxtime was set to 30, and that is what reduced the time left to 30 seconds. But I don't remember this being reported. So I'll look into it a bit more. Chuck, do you remember setting Maximum Time to 30 seconds?
It should be fixed now. $default["side"] didn't do the job I thought it would. So I created a new variable, $logside, just to keep track of the value of side entered in the log.
Okay, I abandoned the old way of telling who is who and instead calculated the total number of moves made, then tested whether this was odd or even to determine who is playing which side.
Again all the logs can not be reviewed since the position skips directly from the starting setup to the last move made.
This was caused by changing the form from POST to GET. I have changed it back to POST for now, but I will change it back to GET eventually, because POST has the problem of not showing a page when you hit the back button, and to see it, you have to reload it. With GET, you don't have to reload a previous page to see it. I think the problem arises from how variables are given priority when starting up. Values for the same variable may come from GET, POST, or the log, and while all the forms were using POST, I was giving GET the least priority. I may have to make the priority thing more complex, giving GET priority when the form uses GET, and giving POST priority when the form uses POST. Generally, I have different uses for POST and GET. I want to reserve POST for a form that should be submitted only once, such as issuing an invitation or sending a move, and use GET for forms which generate pages people should be allowed to go back to or access by URLs. One thing I would like is for people to be able to pin (to pinterest) specific positions in games with a link back to that actual position.
It's now working correctly using GET. Where the code overwrites variables with the values from POST, I had it overwrite them with the values from GET for certain values of the submit button.
OK. It's now working correctly. There is another problem that happens only with randomized variants when one wants to print any entire game; only the final position is showed; it's impossible to review the game because one does not know what was the starting setup. Would there be any way to include both diagrams at once?
The problem was with all variants, not just the random ones. When you clicked Print, it would show the final position, not the current position. It will now show the current position. But I still need to fix the rest of the information to match the position being shown. Perhaps I will have it truncate the movelist at the position shown. But for that, I need something more sophisticated than "echo $movelist;".
The point is that in random variants is important to know the starting setup if you want to review a game OTB reading the moves directly from a paper sheet; in variants whose starting setup is always the same it is not so important that this position be recorded.
Ideally it would be nice that when you click PRINT both positions be recorded: the starting and the current. It's understood that normally you will print finished games.
By the way, there is a lot of Fischer Random Chess logs broken with messages such as "ILLEGAL: N c1-b3 on turn 3: There was no N on c1. The piece on c1 is a K. Go back and try again." [j_carrillo_vii-fergus-2004-138-495]
I believe there was a time, and I don't remember when exactly it was, when PHP changed its algorithm for generating random numbers. This broke games with randomly generated setups, because all I had been storing was the seed for the random number generator, not the setup it generated. It looks like I since fixed that for Fischer Random Chess. It will generate a random setup only if the setup is not already recorded in a constant. This same thing should be done for any randomly generated game on a game-by-game basis. This will keep these games from being affected by future changes to the random number generation algorithm, but it will not fix old games that relied on the old algorithm without recording the randomly generated setup.
Here's what it will do now. It will put the current move in boldface but still print the entire movelist. If you want to keep a printed record of a game of Fischer Random Chess, you can print out the initial position and the final position separately and keep the two printouts together.
OK, with that is sufficient. Regarding the broken Fischer Random Chess logs, they are 78; only 19 are OK. If they can not be recovered, maybe they should be deleted. Hard decision.
I looked into finding the original algorithm used for generating random numbers, but that has not panned out yet. So I am thinking instead of analyzing the moves to determine the initial setups. I could write code to check which pieces move from which spaces on the first and last ranks, set the value of the constant used to record the setup, then proceed with the game.
Sounds good the idea; if it works, perhaps I could use it for recovering the broken logs of my random variants which are in total 26. By the way, I have in mind to invite Garry Kasparov to join this community of CVs fans for playing a game with me of either Symmetric Chess or Cetran Chess 2; then it would be useful, convenient, the presets of these variants to have enforced theirs rules. Could you, please, help me to do it? The key things that I don't know is how to code the Bishops Conversion Rule and the Sissa movement rule. I am very excited since if he accepts, it would be a historic event: the first former World Champion Chess that would play here at The Hall of the Chess Variants!
25 comments displayed
Permalink to the exact comments currently displayed.