Search code examples
automationscriptingsimulationcorewarsredcode

Automating CoreWars


I plan to make an evolutionary program to make redcode warriors for CoreWars. However, I have absolutely no idea how to run the code generated without having to manually open the program and put in the Warriors. Since I hope to have the evolutionary program run through several warriors per minute at least, I'd rather not have to play the role of administrator that much. I'm using the ARES simulator, but as for my research on running warriors through it with a script, I haven't found anything.

I'm really just looking for something like:

SomeSimulator.exe --warrior1 megalordthedestroyer.red --warrior2 tinathebabybunny.red


Solution

  • So I found a python module that supports both parsing redcode and running pmars simulations. With a little bit of patching I'm able to hook this up to my evolutionary factory and automate it all.

    The link: https://github.com/rodrigosetti/corewar