Re: Multiple battles headless?
fnl <[email protected]> Mon, 25 Jan 2021 11:32:23 -0800 (PST)
| Newsgroups | gmane.comp.java.robocode |
|---|---|
| Message-ID | <[email protected]> |
I have not tried to run multiple instances of the RobocodeEngine within the same application. So I don't know if it will work, but it should be easy for you to try out. Regarding accessing resources concurrently, it should not be a problem as long as the robot instance does not write it's data to the same file as another robot instance. You might also try to run the RobocodeEngine from multiple processes e.g. from a shell/batch script or similar. Cheers, - Flemming mandag den 25. januar 2021 kl. 20.28.31 UTC+1 skrev [email protected]: > Just what I wanted, thanks! It will be a bit awkward hooking it up with > what I've got already but it will definitely be faster. > > On a similar note, do you know if it's safe to run multiple instances of > the engine at the same time, or are there resources that can't be shared > concurrently? > > Thanks again! > On Sunday, 24 January 2021 at 20:26:26 UTC fnl wrote: > >> You should have a look at the Robocode Control classes, i.e. the >> RobocodeEngine. >> >> Here is a link to an example. Make sure to click the "Package" on the >> header and scroll down to see the example of how to use the RobocodeEngine >> class: >> >> https://robocode.sourceforge.io/docs/robocode/index.html?robocode/control/RobocodeEngine.html >> >> Cheers, >> - Flemming >> >> lørdag den 23. januar 2021 kl. 22.50.05 UTC+1 skrev [email protected]: >> >>> >>> Hi all, I'm writing a genetic algorithm to build me some robots, and to >>> test them it runs a command like: >>> >>> `./robocode.sh -battle settings.battle -nodisplay -results >>> roundResults.txt` >>> >>> for each robot it generates. It's running this for a lot of robots, so >>> the overhead of starting up the application each time takes quite a while. >>> >>> Is there a way to run multiple battles in one go, or 'hold on' to a >>> single instance of the application that I can call each time for a battle >>> without a display? >>> >>> In case it matters, I'm running it on ubuntu using Python's subprocess >>> module to fire off the command. >>> >>> Thanks! >>> >> -- You received this message because you are subscribed to the Google Groups "robocode" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/robocode/1a1c89a6-89d3-421b-8376-44eb41b7c559n%40googlegroups.com.