1. 21 Mar, 2013 1 commit
    • Sam Moore's avatar
      Fixed bug with probabilities · 8571bc0c
      Sam Moore authored
      Pretty terrible, introduced weeks ago when trying to improve efficiency.
      Also fixed bug with --reveal switch.
      
      Agent Bishop should play better as a result of this (the former not the latter).
      8571bc0c
  2. 14 Mar, 2013 1 commit
    • Sam Moore's avatar
      Actually commit stuff from ages ago · 5287b4f8
      Sam Moore authored
      - Use regex in ExternalAgent to cope with Fortran agents
      - Add "Q" to graphics (although somehow that did get committed?)
      - Did something in src/board.py... no idea what
      5287b4f8
  3. 28 Feb, 2013 1 commit
    • Sam Moore's avatar
      Fix bugs and documentate stuff · 4e3cee35
      Sam Moore authored
      bug - qchess was allowing illegal moves... not good
      documentate - agent_python.html was empty... not good
      
      Thanks to rvvs89 for prettifying agent_python.html
      4e3cee35
  4. 31 Jan, 2013 1 commit
    • Sam Moore's avatar
      Messing with log files · 3decbfd6
      Sam Moore authored
      - 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
      3decbfd6
  5. 30 Jan, 2013 1 commit
    • Sam Moore's avatar
      Added sample agent + log file writing/parsing · a35e4dc5
      Sam Moore authored
      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.
      a35e4dc5
  6. 28 Jan, 2013 1 commit
    • Sam Moore's avatar
      Self inflicted wounds using cx_freeze · 444244d5
      Sam Moore authored
      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!
      444244d5
  7. 24 Jan, 2013 2 commits
    • Sam Moore's avatar
      Lots of stuff happened · 707e794d
      Sam Moore authored
      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.
      707e794d
    • Sam Moore's avatar
      Mostly networking · bfa63f1a
      Sam Moore authored
      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.
      bfa63f1a
  8. 23 Jan, 2013 1 commit
    • Sam Moore's avatar
      Initial Commit · 65d9bb84
      Sam Moore authored
      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!
      65d9bb84