Fixing simulate.py Now reads the round number from an "info" file, instead of counting number of files in the directory. Fixed errors in simulate.py creating .html files. Made results slightly prettier, moved directory to /web/results Included links to raw log files /web/log for games. Should install an apache server on mufasa, so that people can view the results online.
Small changes to several things Changed combat outcomes for equivelant ranks: Up until now, victor was randomly chosen Changed so that result is always "BOTHDIE" Updated manual page for manager Added section on unbuffered stdin/stdout Modified sample agents to take into account MULTIPLIER There is no way for a human player to move the scout multiple spaces yet. Sample agents still play each other fine, but since none of them actually move scouts multiple spaces, this doesn't prove the new code works. TODO: Test properly (add scout movement to asmodeus and see if everything still works?) Updated webpage. Added section on unbuffered stdin/stdout Added some other pointless waffle. Mmmm waffle. TODO: Make simulate.py keep track of the round number properly. I'm sure this is simple to do, but I can't be bothered right now.
Improved simulate.py I want to generate semi-useful results .html pages using simulate.py It doesn't do this yet, but now it stores all the information I might need in a dictionary. The dictionary for each agent replaces the array which I was previously using. I also made some more of the global variables into optional arguments with default values.
Fixed bugs, minor changes Fixed segfault in manager caused by attempt to print invalid setups to log Fixed SIGPIPE in manager caused by attempt to message non-existant programs. Although I previously fixed a similar SIGPIPE, It is also possible for a file to exist but not have executable permissions set. Controllers set to use such files as executables were returning true for Valid(), but were in fact, not valid at all. Use the access function (thanks stack overflow!) to check for executable permissions and existence in Program::Program. If they aren't set, or file doesn't exist, set pid to -1 which is an "invalid" controller. Discovered python trick which allows me to get rid of stupid "run.py" files for the python AIs. Modified the simulate script to take the number of rounds as an argument. Also made its output slightly prettier. Currently testing simulation of 10 rounds on my laptop at home. "./simulate 10; shutdown -h -P now" I hope it doesn't set the desk on fire while I'm asleep... :S Oh, and the VM is finally setup, hooray!