How to Run Ocean of Code github project Locally


#1

Please i’m trying to clone and run the project from github but I didn’t find out how to run it!

Please any instructions to run the project ?


#2

You can run your code from a local file using the extension and Chrome application. This is what I currently use so that I can edit my code from my own text editor.

https://www.codingame.com/forum/t/codingame-sync-beta/614


#3

If you want to run it locally you need to have JDK 1.8 (or higher) and Maven installed.

Then you need to do the following:

  • Run mvn clean install to install the required dependencies.

  • Run the src/test/java/Main.java which will dump the game summary on the stdout, and will also give you a web version to see the game in action (e.g. http://localhost:8888/test.html). Note: by default this runs the default dummy agent.

  • Write your own bot and update the src/test/java/Main.java to run it as an agent.


#4

Can you be a little more specific when you write

Run the src/test/java/Main.java

Did you really run it, or do you only guess what’s need to be done?


#5

I’m using IntelliJ community IDE integrated with Maven.


#6

Hi,
Can you help me?
What to do to save the values of weights for neural networks?


#7

Sorry I’m no expert in this topic. But this might help you: https://www.codingame.com/forum/t/neural-network-ressources/1667.


#8

I am not familiar with Java tools, could you pls help how to run the referee locally?
What I did so far: installed maven, installed JDK 1.8, run “mvn clean install”. I have a compiled jar file.
When I try to run it, it says “no main manifest attribute”.
My command line was (worked with some other multi referees):

java -jar -Dleague.level=2 cg-ooc.jar -p1 “php ooc_v01.php” -p2 “php ooc_base.php” -s -l ./logs/game_single.json > report_single.txt

How to set “main manifest attribute” (whatever it is)? Thx.


#9

Hi @TBali, this is not implemented in the game repository yet.
I created a PR for it here: https://github.com/CodinGameCommunity/ocean-of-code/pull/2.
Or you can use it directly from my fork.


#10

Thank you, your fork did the trick! :slight_smile:


#11

Happy to help :slightly_smiling_face:

Also it is merged to the game repository now :wink: https://github.com/CodinGameCommunity/ocean-of-code.