Open AI Championship

Repeater utility

Round 1: before start

Project

Sandbox

Round 1

Round 2

Finals

Recent comments

19 november 17:26: third112 wrote comment on post Language packages
19 november 15:41: GS wrote comment on post Language packages
19 november 14:13: MrMorozis wrote comment on post Language packages
19 november 13:54: third112 wrote comment on post Language packages
19 november 04:24: Jeners wrote comment on post Sandbox
19 november 02:00: MrMorozis wrote comment on post Repeater utility
19 november 01:52: dbf wrote comment on post Repeater utility
19 november 00:55: MrMorozis wrote comment on post Repeater utility
19 november 00:37: MrMorozis wrote comment on post Repeater utility
19 november 00:34: MrMorozis wrote comment on post Repeater utility

VK Group

Telegram chat

 

For easier strategy development process you have an option to run local replays. You can locally replay a game that has been tested on the server. To do so, first download the Repeater and extract it. You will need an installation of Java 8+ Runtime Environment (you can find JRE in the corresponding section on the Oracle site) to run the Repeater.

Local replay is an option to run your strategy on your computer in a such a way, that it will see the world around it the same as it was while testing on the server. This will help you to debug, add logging and watch the reaction of your strategy during the game.

Please notice, that any interaction of your strategy with the game world during local replay is completely ignored. That means, that every moment the environment of the strategy is exactly the same as it was, and does not change, no matter what your strategy writes to the move object. The utility does not have full data of the game (only a part that was sent to your strategy), thus can not visualize the game. If your strategy does not have any breakpoints and/or some logging, it will «silently» do its job and terminate.

How to use the utility:

  1. authorize on the site, download an archive and extract it to a convenient place;

  2. choose a game with your strategy, and go to its page by following the link in the column “#”;

  3. if the game is tested, you will see a button “Local replay” on the right;

  4. after clicking on it a window will appear with a list of all your strategies that participated in the game, and their corresponding tokens;

  5. run the Repeater, passing the token as a command line parameter, or just enter it to the appeared terminal, after which the Repeater will download all necessary data and will start waiting for your strategy to connect;

  6. compile your strategy. Note that the entry point is located in Runner.{ext} file, and this file is the one to run;

  7. after starting your strategy will connect to the Repeater, that will emulate the behavior of the game world as it was tested on the server.

Attention! Local replay is only available within 2-3 days from the moment of creation of the game!



ykaland

ykaland

Organization::API

Powered by Yandex.Translate

Something Repeater does not start from me. Can I download somewhere the old version?

Nov 18, 2017 7:10:47 PM
SladeThe

SladeThe

Russian AI Cup Team

ykaland

ykaland

Organization::API

Powered by Yandex.Translate

Something Repeater does not start from me. Can I download somewhere the old version?

Everything seems fine with the current version. And what is wrong? What error gives?

Nov 18, 2017 8:20:20 PM
Adler

Adler

Дзержинск

Powered by Yandex.Translate

if the site token will allocate cash click you can easily lose the last two characters of the token

Nov 18, 2017 9:55:27 PM
OREZ

OREZ

Казань

SladeThe

SladeThe

Russian AI Cup Team

Powered by Yandex.Translate

Everything seems fine with the current version. And what is wrong? What error gives?

When running on Windows repeater.bat file flash fast 2 console window and close, nothing happens

Nov 19, 2017 12:19:05 AM
tyamgin

tyamgin

Симферополь

OREZ

OREZ

Казань

Powered by Yandex.Translate

When running on Windows repeater.bat file flash fast 2 console window and close, nothing happens

You can remove the batch file start "", and run from the console. Then we can see the error.

Nov 19, 2017 12:21:09 AM
MrMorozis

MrMorozis

Метран

Powered by Yandex.Translate

Such trouble:

If you are trying to run Repeater’e game against Leos, for example, 37459, 41522, where my strategy fell, then after downloading the replay a Repeater just quits without error message. The game is not played.

If you’re trying to play a game against another player where my strategy did not fall, then everything is fine. This is a bug or a feature? Strategy falls time has been exceeded only when playing against the Leos. I want to know why, but in the end falls and repeater! Miracles.

Nov 19, 2017 12:34:26 AM
MrMorozis

MrMorozis

Метран

MrMorozis

MrMorozis

Метран

Powered by Yandex.Translate

Such trouble: If you are trying to run Repeater’e game against Leos , for example, 37459 , 41522 , where my strategy fell, then after downloading the replay a Repeater just quits without error message. The game is not played. If you’re trying to play a game against another player where my strategy did not fall, then everything is fine. This is a bug or a feature? Strategy falls time has been exceeded only when playing against the Leos. I want to know why, but in the end falls and repeater! Miracles.

UPD: The game against Leos’a is not reproduced, even if the strategy did not fall.

Nov 19, 2017 12:37:06 AM
MrMorozis

MrMorozis

Метран

Powered by Yandex.Translate

In the fall gives this:

[……………………………………………………………………. ………………………………………………………]

Bye Exception in thread “main” java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Unknown Source) at java.io.ByteArrayOutputStream.grow(Unknown Source) at java.io.ByteArrayOutputStream.ensureCapacity(Unknown Source) at java.io.ByteArrayOutputStream.the write(Unknown Source) at com.codegame.codeseries.repeater.Repeater.readStream(Repeater.java:17 2) at com.codegame.codeseries.repeater.Repeater.lambda$downloadDump$0(Repea ter.java:130) at com.codegame.codeseries.repeater.Repeater$$Lambda$1/28227499.accept(U nknown Source) at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source) at java.util.Spliterators$ArraySpliterator.forEachRemaining(Unknown Sour ce) at java.util.stream.AbstractPipeline.copyInto(Unknown Source) at java.util.stream.ForEachOps$ForEachTask.compute(Unknown Source) at java.util.concurrent.CountedCompleter.exec(Unknown Source) at java.util.concurrent.ForkJoinTask.doExec(Unknown Source) at java.util.concurrent.ForkJoinTask.doInvoke(Unknown Source) at java.util.concurrent.ForkJoinTask.invoke(Unknown Source) at java.util.stream.ForEachOps$ForEachOp.evaluateParallel(Unknown Source ) at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(Unknown Source) at java.util.stream.AbstractPipeline.evaluate(Unknown Source) at java.util.stream.ReferencePipeline.forEach(Unknown Source) at java.util.stream.ReferencePipeline$Head.forEach(Unknown Source) at com.codegame.codeseries.repeater.Repeater.downloadDump(Repeater.java: 88) at com.codegame.codeseries.repeater.Repeater.main(a Repeater.java:299)

Nov 19, 2017 12:55:09 AM
dbf

dbf

A

Powered by Yandex.Translate

MrMorozis, generally it’s a standard Java error that not enough memory can the program leak, but you can try to treat the change in the file repeater.bat line-Xmx1G to -Xmx2G or -Xmx4G (adding a repeater to memory 2 or 4 GB, respectively).

Nov 19, 2017 1:52:45 AM
MrMorozis

MrMorozis

Метран

Powered by Yandex.Translate

The problem is solved.

Replaced .bat to start the repeater parameters -Xms256M -Xmx1200M and it worked.

Thank you all.

Nov 19, 2017 2:00:15 AM