Fix bugs with FifoPlayer and Networking
QWebchess work It sort of works, most of some of the time
cgi-script almost working
Dedicated server stuff should now work I call it the "Eigenserver"
Making dedicated match making server Start server with `./qchess.py --server` Connect from clients with `./qchess --server=address`
Made networking work hopefully The code is getting really ugly, but it works
Changes to Networking code Don't work
Fixed networking! *touches wood*
Add screen blackout to qchess Just because it bugged [BOB] that the screen never went to sleep when using qchess_login.sh Aren't I nice?
Getting ready to run rounds Got sidetracked writing "swarm" to parallelise rounds. It's not ready yet, but I wrote run.sh to run a round. Which should work even if I never finish swarm. It'll just be ridiculously slow. Changed structure of agents directory (same as last year). Minor changes to qchess. Added yet another wrapper class for replaying logs. FileReplayer replaces the standard python file; if a game is still in progress you can use that. I noticed the Http log replay was breaking a while ago, but I haven't investigated. TODO: - Finish swarm - Generate pretty html pages from results (but hopefully make the script nicer than last years) - Handle errors/illegal moves properly. Enforce the timeouts. - Include draws/stalemate - events? prizes? profit? - BUG FIXING - Read TODO lists more often, because I usually just write them and then never read them
Messing with log files - Fixed storing of whether pieces were revealed or not in log files - Just prepend '?' to the hidden types, removed the Piece.types_revealed list - Implemented Agent resetting of board state from strings - ReplayPlayer will call the Agent.reset_board() function - run_agent() looks for lines between "BOARD" and "END BOARD" - This API will not be compulsory for entered agents - All games will start with the initial board state, it is not required - Fixed other stuff with log files - Needed to work out whose turn it is when the game continues from a log - HttpLog -> ShortLog (since it just writes to a file) - To get a log from http, use --file=http://address - This works for either ShortLog or LogFile written logs - But if the game hasn't ended there is a bug with the LogFile logs - Can now have multiple logs at the same time - Hopefully nothing is borked
There's probably a better way of doing this... Get log to show last selection and movement So that the "client" doesn't get confused if it misses a selection/move Client has to rebuild the board every time, yuck
Feature creep in log files I want to be able to watch a game that's playing on the server! Without having to actually use sockets and shit! I've used enough sockets already!
Added sample agent + log file writing/parsing I figured no one wants to sift through the qchess internal agent stuff, So I wrote a python external agent agents/sample.py I ended up implementing the cool idea about log files. You can replay a log file up to an arbitrary point, and then continue play. I also fixed a bug with external agents calling run_agent. Removed the reading of the colour line from there, since the external agent should do it. Added reading of the colour line to the ExternalWrapper class, to avoid breaking that. Added --reveal so that all states can be seen in the GUI (but they are not communicated to Agents). Added handling of SIGINT to main.py Probably did something else I forgot. qchess will probably be ready soon (famous last words), I should start on a scoring/entry system... And a webpage.
Progress? - Fixed .dll files that were the wrong ones for cx_freeze win32 - Created "internal" agents, and made AgentBishop one of them - Implemented terrible wrapper class that runs an internal agent in a seperate python process - This is for when timeouts are used - select == better than threads - TimeoutPlayer appears to not work properly anyway - Tested win32 version (script and frozen binary) - ExternalAgent seems to break - TimeoutPlayer seems to break (even more than normal) - Pretty much everything breaks actually - More things seem to break with the frozen binary than with the script - Amazingly the pygame interface doesn't break, just the fancy threading/subprocess/socket/file related stuff - Somehow, the InternalAgents, ie: AgentBishop were working - So windows users can play the python sample agents, but otherwise the program is pretty useless - Implemented the --log and --file arguments - Get an error if the game hasn't actually finished when using --file, should probably fix - It might be cool to let people use --file for a set number of moves, and then continue play from that position - Would need more work... - When graphics are disabled, the game still works - But I need to test it on a server that doesn't have pygame at all TODO: Finish the qchess program and actually work on setting up the competition.
Self inflicted wounds using cx_freeze The pain is freezing me. I've been trying to freeze the qchess.py script into a win32 binary, so that windows people don't need to install python. Except I've realised that they will probably install python to enter anyway, since it is the easiest language. HER DURP. I mostly got cx_freeze to work. Fun tip: Unicode strings cause segmentation faults So wrote hacky script to save unicode characters to png files, then use png files in frozen versions. cx_freeze in linux worked amazingly well. For windows... I installed python and cx_freeze in wine... this was probably a mistake, because all the dll files were missing. But I found all the dll files, so that's fixed. qchess.exe works in wine, but can't load python agent programs... because windows doesn't understand #! Well, fuck. Also annoying bug with Tk open file dialog mouse which I cannot be bothered chasing. Tried hacky batch file, but it doesn't work in wine. Will try in Windows 7 soon. PS: Also changed directory structure somewhat. Ironically, using cx_freeze doesn't result in freezing programs!