Skip to content

Parallelize MatchRunner#6

Open
stephenbush-wf wants to merge 5 commits into
bovard:masterfrom
stephenbush-wf:Parallelize_MatchRunner
Open

Parallelize MatchRunner#6
stephenbush-wf wants to merge 5 commits into
bovard:masterfrom
stephenbush-wf:Parallelize_MatchRunner

Conversation

@stephenbush-wf

Copy link
Copy Markdown

@bovard Code Review

Problem

Summary

There were problems when trying to parallelize matches because each match was reading/writing from the same config file which is re-written for each game, so:

  • first thread writes to config file
  • first game begins running with specified settings
  • second thread re-writes config file
  • second game begins running with specified settings
  • first game finishes, reads config file to match winning Team (A/B) to teams playing, but config file has changed since it started, and wrong team is reported as winner.

Areas of Impact

  • Config management
  • Match Running
  • Replay watching
  • General all-around archon functions

Solution

Each thread now runs with its own dedicated config file which (should) remain undisturbed until the match is run, completed and reported, and then it runs the next game with that file.

Also provided a dedicated default config file (no longer bc.conf) so that players are free to manipulate their own default settings without archon changing/overwriting them. Consequently, I also removed the config cleaner, because archon has a dedicated config file now that shouldn't need to be cleaned.

How to QA/+10

  1. Run matches with -p [numThreads] // --processes [numThreads] flag! Verify that games and results appear to run as expected.

@bovard

bovard commented Feb 1, 2016

Copy link
Copy Markdown
Owner

Looks good! I'll give it some testing tonight/tomorrow.

Glad that we are no longer messing up bc.conf

@stephenbush-wf

Copy link
Copy Markdown
Author

Me too!! I had to manually back it up and put it back whenever i used archon :)

Only problem i'm seeing now is a big list of config files left around. Might need to add something to delete the files created by the runner before the thread exits. Though there's no guarantee it would run if the user cancels archon early, and the files would be left anyway.... Idk.

@BNoohi

BNoohi commented Oct 26, 2016

Copy link
Copy Markdown

Will this be merged in? And, on that note, is there intention to maintain this repo for battlecode2017?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants