When INTERNAL_ERRORs occur, the colour wasn't added to the array in the "ALL" results.
So when the script looks up agents["ALL"][index][4] (the colour entry), there was an indexing error.
Fixed by adding the colour to the result array when INTERNAL_ERROR occurs.
TODO: Discover cause of INTERNAL_ERROR - in the manager program
It occurs on mufasa, but not on my laptop.
I believe it is due to AI timeouts not being handled correctly by the manager program (stratego).
On my laptop, things run nice and fast, and since all the AI work properly, there are no timeouts.
On mufasa, things run shit and slow, and pretty much every game I tested ended with a move timeout.
Timeout causes broken pipe after AI program is told to exit?
As a temporary measure, increased timeout to 60s (from 2s). If this doesn't stop timeouts,
there must be some other factor making things slow.
"The problem is determining where the shittiness lies... is it the shittiness of the VM, the shittiness of python,
the shittiness of the manager program..."
Running another test round on mufasa over christmas. Hopefully it will finish running by new year. (Assume 60s a move, 300 moves a game... 12 games...)
Considering putting my laptop in the clubroom and just running the competition on that.
# Sample C++ Stratego AI
# UCC Programming Competition 2012
-CPP = g++ -Wall -pedantic -lSDL -lGL -g
+CPP = g++ -Wall -pedantic -g
OBJ = basic_cpp.o
BIN = basic_cpp
class AI_Controller : public Controller, private Program
{
public:
- AI_Controller(const Piece::Colour & newColour, const char * executablePath, const double newTimeout = 2.0) : Controller(newColour, executablePath), Program(executablePath), timeout(newTimeout) {}
+ AI_Controller(const Piece::Colour & newColour, const char * executablePath, const double newTimeout = 60.0) : Controller(newColour, executablePath), Program(executablePath), timeout(newTimeout) {}
virtual ~AI_Controller() {}
# Not used for building simulate.py
# Used for building/removing results
-BASEDIR = /home/sam/Documents/progcomp2012/progcomp
-RESULTSDIR = /home/sam/Documents/progcomp2012/progcomp/web/results
-LOGDIR = /home/sam/Documents/progcomp2012/progcomp/web/log
-AGENTSDIR = /home/sam/Documents/progcomp2012/progcomp/agents
-MANAGER = /home/sam/Documents/progcomp2012/progcomp/judge/manager/stratego
+BASEDIR = /../../
+RESULTSDIR = /../../web/results
+LOGDIR = /../../web/log
+AGENTSDIR = /../../agents
+MANAGER = /../../judge/manager/stratego
sys.stdout.write("Garbage output! \"" + outline + "\"\n")
red["INTERNAL_ERROR"].append((blue["name"], gameID, scores["INTERNAL_ERROR"][0]))
blue["INTERNAL_ERROR"].append((red["name"], gameID, scores["INTERNAL_ERROR"][0]))
- red["ALL"].append((blue["name"], gameID, scores["INTERNAL_ERROR"][0], "INTERNAL_ERROR"))
- blue["ALL"].append((red["name"], gameID, scores["INTERNAL_ERROR"][0], "INTERNAL_ERROR"))
+ red["ALL"].append((blue["name"], gameID, scores["INTERNAL_ERROR"][0], "INTERNAL_ERROR", "RED"))
+ blue["ALL"].append((red["name"], gameID, scores["INTERNAL_ERROR"][0], "INTERNAL_ERROR", "BLUE"))
managerErrors += 1
else: