1
\$\begingroup\$

Can I post KOTH challenge, but non-language specific?

\$\endgroup\$
4
  • 1
    \$\begingroup\$ If you're considering writing a KotH, I'd recommend reading the wiki! It addresses this, as well as lots of other useful stuff. \$\endgroup\$ Jan 3, 2022 at 18:50
  • \$\begingroup\$ @RedwolfPrograms i don't understand \$\endgroup\$
    – Fmbalbuena
    Jan 3, 2022 at 18:50
  • 1
    \$\begingroup\$ That page has a lot of useful information on writing KotH challenges \$\endgroup\$ Jan 3, 2022 at 18:51
  • \$\begingroup\$ @RedwolfPrograms TLDR \$\endgroup\$
    – Fmbalbuena
    Jan 3, 2022 at 18:53

2 Answers 2

2
\$\begingroup\$

Non-language-specific KotHs were actually pretty common up until a few years ago. Their popularity has decreased because it's easier to just use JS, Python, or Java, and most people will be familiar enough with those languages to write a bot.

If you do want to make a language specific KotH, as HN suggested, you can use STDIO to allow your controller to interface with bots. This does mean you'd likely need to install Node.js, Python, a JDK, and any other languages people decide to write bots in, and it will make it more difficult for other people to run the controller to test their bots since they'd have to go through the same steps.

The actual implementation of this can be done a couple of ways. The simplest would be running each bot once per turn, and providing its position, storage, and any other relevant information as arguments or STDIN, and then using its STDIO or exit code to determine its move. A second way would be starting up all of the bots at the beginning of the round, and having them continue to run as processes and communicate to them each turn via STDIO.

As for the question of if you should, here are a few things to consider:

  • How important is it to you that people can run their own or others' bots easily?
  • How much time do you have for maintaining the challenges, and ensuring you have all of the right languages (and language versions) installed?
  • How difficult is your KotH (simpler KotHs likely aren't worth the additional complexity)?

In my case, I've always gone with JS-only (since that lets people run the controller online, making it much easier to write a submission). However, I'll usually add a side note saying something along the lines of:

This challenge is JS-only, but if you don't know JS well enough to compete, feel free to send me your bot in another language and I'll translate it for you.

This definitely isn't required, and it's pretty unusual, but it might be a good compromise if you want the simplicity of a single language, but the accessibility of a non-language-specific KotH.

\$\endgroup\$
6
\$\begingroup\$

Re. your title. Should you? That's up to you. Non-language-specific KoTH challenges are of course more accessible to more users, but harder to do.

Can you? Yes. One way to do it is to interface with the program via standard input/output, instead of calling functions or interfacing with a module. It's potentially slower and you have to deal with using text I/O, but if you can do those, there's nothing stopping you from doing it.

\$\endgroup\$

You must log in to answer this question.

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