13
\$\begingroup\$

The idea was mentioned in chat earlier today that KotHs could be run in a distributed fashion. I believe that there are several users (including me) who have Raspberry Pis that could contribute to a KotH Pi Farm.

This is an idea that I would like to see move forward. It would allow for up-to-date results to be continuously generated, or for a "continuous KotH" to be played. It would also take some of the processing burden off of contest hosts.

What would be the first steps in setting up this distributed KotH project?

\$\endgroup\$
4
  • \$\begingroup\$ Targeting embedded computers specifically seems like a lot more trouble than it would be worth. \$\endgroup\$ – Sparr Jun 4 '15 at 18:37
  • \$\begingroup\$ @Sparr I suppose the Pis aren't a strong requirement, just an option. It may be easier for people to donate computation time on their regular computers. \$\endgroup\$ – PhiNotPi Jun 4 '15 at 18:39
  • \$\begingroup\$ If it's just distributing the calculations then a mix of different computers will be fine. The only reason I had previously suggested raspberry pis was so that each competitor could have their own assigned pi with identical capabilities, without having to share with other bots. \$\endgroup\$ – trichoplax Jun 10 '15 at 16:27
  • \$\begingroup\$ It could also be worked in with reputation. So running code for a KotH earns you points, although this raises further questions similar to point 1 of Nathan Merrills answer \$\endgroup\$ – HEGX64 Jun 14 '15 at 11:13
3
\$\begingroup\$

You're asking for the steps, not the actual implementation. Here's a few things that need to be resolved for distributed KoTHs to be implemented.

  1. The method of obtaining usage rights to the machines. If I write a KoTH that could use it, and then post it (lets assume it doesn't get closed), do I automatically get usage of the machines? If not, what are the steps for obtaining the machines?

  2. Is giving a machine an all-or-nothing deal? If two distributed KoTHs are running, do I have the choice to run one, but not the other?

  3. Do we set the method of communication across the board (with the rare exception)? What should that method be (HTTP, STDIO, implementing a function)?

  4. Do we care about security of the machines running the tasks? I don't think it's going to be possible to hide the connection details, which makes me think we are opening up our machines to attacks.

  5. What kind of KoTHs do we support? Do we only support turn-based KoTHs, or are we open to fastest-code or real-time KoTHs?

We are going to need a flexible controller. This controller will be used as the base for all distributed KoTH challenges. Depending on how we answer to #2-5, it will make the controller easier or harder to program.

\$\endgroup\$
1
\$\begingroup\$

An idea for running a distributed javascript KotH within a code snippet, using google spreadsheets for storing matches and results:

Start with one of the existing javascript KotH controllers that exist in a code snippet, so the user can run the controller and a match in their browser.

Add two google spreadsheets. The first is a list of desired matchups. The second is a list of submitted results, and gets added to via a google form.

Now, modify the controller so that it automatically queries the spreadsheets to figure out which matchups haven't been run [enough times], runs one such matchup, and submits the results to the form.

The end result is that you get multiple copies of every desired matchup having been run. If the outcomes are too widely varied, that probably means there's too much randomness in the spec, maybe it needs more iterations per match? Or maybe someone is cheating, so maybe some sort of way to identify the submitter would be required.

PS: Now, take everything I just said, and remove the javascript. Now people have to checkout the controller code from github or wherever before they can run it, but everything else about the idea remains the same.

\$\endgroup\$
1
  • \$\begingroup\$ The only problem I can see is that the difference in computer speeds could give different outcomes (some players may be near the time limit on the OP's computer, but over the time limit on others). \$\endgroup\$ – trichoplax Jun 5 '15 at 23:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .