summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
Sam Moore [Wed, 30 Jan 2013 06:50:22 +0000 (14:50 +0800)]
Started work on website
I forgot how terrible web design is.
Sam Moore [Tue, 29 Jan 2013 16:47:24 +0000 (00:47 +0800)]
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.
Sam Moore [Tue, 29 Jan 2013 10:12:05 +0000 (18:12 +0800)]
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.
Sam Moore [Mon, 28 Jan 2013 15:21:32 +0000 (23:21 +0800)]
Probably important...
Sam Moore [Mon, 28 Jan 2013 14:54:56 +0000 (22:54 +0800)]
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!
Sam Moore [Thu, 24 Jan 2013 09:05:09 +0000 (17:05 +0800)]
Lots of stuff happened
1. Argument parsing. We have it
2. GUI. We have it
3. Networking. We have it.
4. Timeouts. We have those. Sort of. Not for Windows.
5. Help page. We have that too.
I think you'll find it quite... helpful
We still don't have log files. Most of previous TODOs still apply.
Sam Moore [Wed, 23 Jan 2013 19:07:26 +0000 (03:07 +0800)]
Mostly networking
It is pretty much a hack
Fixed dodgy symlinks from agents directory, thanks [SLX]
Need to fix argument parsing for qchess program, but can't be bothered right now.
Sam Moore [Wed, 23 Jan 2013 14:02:36 +0000 (22:02 +0800)]
Fix qchess/update.sh
Accidentally bashed self in foot
Sam Moore [Wed, 23 Jan 2013 13:21:09 +0000 (21:21 +0800)]
Initial Commit
Now is probably a good time to start using git
1. Implemented quantum chess as described here:
http://research.cs.queensu.ca/Parallel/QuantumChess/QuantumChess.html
- Except I have "white on the right"
2. Wrote sample agent "agent_bishop.py" which is already better at the game than I am
3. Sort of got sidetracked trying to split my original quantum chess python file into multiple files.
- Difficulties because there are circular dependencies with the graphics / game stuff
- eg: HumanPlayer needs to know about GraphicsThread to get its move
and GraphicsThread needs to know about HumanPlayer to draw stuff and give it a move
4. Ended up writing a bash script to combine multiple python files into single qchess.py file.
- It was easier than working out how __init__.py and __main__.py work / do not work
- "from . import *" doesn't work and apparently is "bad practice" or something
- Bash scripts are the best practice
- It will probably backfire horribly. Hence, git
TODO:
- Either borrow sigma from [DJA] again, or setup a new progcomp server at UCC
- Make website for results / information
- Depending upon how adventurous I feel it might be django
- Or a .html file created by a bash script
- Make judging / scoring system
- Need to implement move timeouts for AI players (remember to use select this time)
- Organise some sort of event for people to come to
- Should probably talk to #committee at some point
- Get people interested? Bribe them? Threaten them with account locking if they don't enter?
- If I get 4 entrants it will be a doubling in entries since 2010!
UCC git Repository :: git.ucc.asn.au