gcode-mirror / ai-contest

Automatically exported from code.google.com/p/ai-contest
0 stars 1 forks source link

Support Ocaml #50

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
A contestant on the forums (mtcbot) has ported the starter package to Ocaml. 
Try to get this up and running.

Original issue reported on code.google.com by cameron.jp@gmail.com on 7 Sep 2010 at 2:11

Attachments:

GoogleCodeExporter commented 9 years ago
Should be running. Would you test it for me?

Original comment by danie...@gmail.com on 17 Sep 2010 at 5:00

GoogleCodeExporter commented 9 years ago
Does not work at the moment. And, for some reason, the server now does not send 
compilation errors by email, so I cannot figure it out. But, the failed 
submission shows in the recent submission table on "My Profile" page, so at 
least the language autodetection works.

A wild guess - in the conditional

http://code.google.com/p/ai-contest/source/browse/trunk/planet_wars/backend/comp
ile_anything.py#158

there is "Ocaml", but maybe there is "OCaml" in the database?

Original comment by havle...@gmail.com on 17 Sep 2010 at 6:50

GoogleCodeExporter commented 9 years ago
Looks like there is a mismatch between the database and the script 
compile_anything.py.

1) Clearly, at

http://code.google.com/p/ai-contest/source/browse/trunk/planet_wars/backend/comp
ile_anything.py#213 

the variable detected_lang is set to "OCaml"

2) but, in compile_function(), the conditional tests against the string 
"Ocaml", at

http://code.google.com/p/ai-contest/source/browse/trunk/planet_wars/backend/comp
ile_anything.py#158

3) moreover, there is no return statement in the OCaml branch in 
compile_function()

4) However, there is no return statement in other branches for already working 
languages (e.g. Ruby). I'm not sure I understand it...

-- PROPOSED FIX --

Change "OCaml" to "Ocaml" in the database, and maybe add return statement
at

http://code.google.com/p/ai-contest/source/browse/trunk/planet_wars/backend/comp
ile_anything.py#161

-- ORIGINAL ERROR MESSAGE --

Unfortunately, your latest submission to the Google AI Challenge did not 
compile successfully. Check out the error messages below for more information 
as to why this might be. Fix as many of the errors as you can, and then submit 
your code again.

COMPILER OUTPUT

Found entry.tgz. Attempting to unpack.
tar xfz entry.tgz > /dev/null 2> /dev/null
Found MyBot.ml. Compiling this entry as OCaml

COMPILER ERRORS

There was an unspecificed Error. (compile_function returned None.)

Sincerely,
The Compile Script

Original comment by havle...@gmail.com on 18 Sep 2010 at 7:44

GoogleCodeExporter commented 9 years ago
Could you test it again?

Original comment by danie...@gmail.com on 20 Sep 2010 at 12:22

GoogleCodeExporter commented 9 years ago
Thanks, it works now

Original comment by alexey.s...@gmail.com on 20 Sep 2010 at 12:36

GoogleCodeExporter commented 9 years ago
Great!

Original comment by danie...@gmail.com on 20 Sep 2010 at 1:57