-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make bot implementations that are network-controlled illegal during the tournament #524
Comments
I guess the go-to solution would be to run the clients in a container (Docker/systemd) without network access. We could whitelist the ports that are needed for zmq but if it is on the same machine, we could also use a file socket. It might already be possible to run it that way (with |
I am not happy about adding a docker/systemd dependency to the setup for a tournament. This means that at most one person in the faculty knows how to run the tournament ;) What about coming up with a simple shell script using This does not need to be 100% bullet-proof. And I guess they will ask us if they can do it before attempting it, so it is really just to be sure that no one is trying really hard to cheat. |
I’d then suggest turning off the network as a solution that everybody can understand. ;) Do we really need to script it then just to find out whether they are trying to cheat? We could also run all players in CI and if a team is much better during tournament than in our CI runs, the code will have to stand some deeper investigation. :) OTOH, sometimes people want to do good things and just use the network to print things from twitter. We would kill them too if we forbid network usage completely. |
You guys are bringing this quite far ;-) I would forbid human interaction during the game via the rules, and that's it. If people really want to cheat, than let them cheat - it's their problem! |
But doing that means that you would have problem getting last-minute commits if needed or who knows what. Or forget to push the results of the tournament at the end. I think assuming to be able to have a machine without network is unrealistic.
Come on, this not realistic either. Would you really check if some clients perform much better during the tournament than in the CI? And how?
Exactly. They can dump twitter feeds if they want. My idea of the script is just a warning for us. If the script does detect network activity, we investigate. This is an example dump from my console while running a pelita game on another terminal:
|
@fmaussion : yes, that would be my plan too. The script would be there just to help in the detection of problems. |
;) |
That would be detected by the script!
…On Thu 20 Sep, 13:28 +0000, Rike-Benjamin Schuppner ***@***.***> wrote:
>Exactly. They can dump twitter feeds if they want. My idea of the script is just a warning for us. If the script does detect network activity, we investigate.
if 'attack' in twitter_stream.filter('#aspp-code-strategy').head():
state[bot.index]['mode'] = attack
;)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub¹, or mute the thread².☘
––––
¹ #524 (comment)
² https://github.com/notifications/unsubscribe-auth/AAVMC_6E8J7jA0IU5rVWpVaqtardRT5hks5uc5gCgaJpZM4Wvhj-
|
But your idea of a script would just run in a separate terminal while doing some tests and in a while True loop always grepping |
Yes, something like
sudo watch ss -tpla
(no need for a while True loop, I think). And just grep for URL which are not 127.0.0.1 ...
…On Thu 20 Sep, 06:50 -0700, Rike-Benjamin Schuppner ***@***.***> wrote:
But your idea of a script would just run in a separate terminal while doing some tests and in a while True loop always grepping `"pelita"` for forbidden connections? Or do you imagine something more elaborate?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub¹, or mute the thread².☘
––––
¹ #524 (comment)
² https://github.com/notifications/unsubscribe-auth/AAVMC-aVIz0t5RJIjHhAGj7UuvK_ey6xks5uc50fgaJpZM4Wvhj-
|
Come on guys, if a team is controlling their bot via Twitter hashtags, don't they deserve to win? =P |
Come on guys, if a team is controlling their bot via Twitter hashtags, don't they deserve to win? =P
No, honestly no. We have seen this for the first time in Camerino. They had this idea of controlling the bot remotely, with two control modes: changing strategy and manual override of single moves. They spent considerable time understanding the intricacies of network-programming, sockets, contexts, re-use of ports and addresses, synchronization issues, and a zillion other things. They did not succeed, in the sense that the code was more or less working, but then they had to realize that even with the remote control they didn't beat most of the others. They tried the remote control by twitter, by the way: it failed because it wasn't fast enough, and because twitter limits the amount of API requests in a given amount of time, so they pretty soon, while testing, were blocked (together with the rest of the groups, because all laptops shared the same public IP in a NAT).
The problem with this approach is that it is clever, but, first, it makes games and the tournament not replicable, and second, more important, it drains a lot of energy and time from the group project which would be better spent in trying to applying the SD techniques learned during the school. The new page https://python.g-node.org/wiki/pelita about the programming project explains this quite well, in my opinion.
So, to avoid further waste of time from other groups, I'd say that we should advertise a new rule that remote control is forbidden, and have a simple mechanism in place that helps us detect it and warn the students before they go down that route. It doesn't need to be perfect, it should just help us detect soon enough to avoid damage.
|
I think the new API is just too easy to use if they end up having time for this. ;) |
@otizonaizit I was joking, but thanks for the rationale. One objection is that I don't see why futzing with twitter APIs is fundamentally different than futzing with NumPy APIs. It is still software development. But, I agree with the overall sentiment anyway. How did you solve the replicability issue for the tournament videos? |
The tournament videos are recreated from JSON output not because we replay them. |
One could argue that by looking at the main screen during the tournament and therefore being able to make decisions based on the unnoised enemy positions, the teams using human-created live input (no matter if Twitter or another homemade network solution) do have a qualitative advantage over those teams that rely just on what their |
Well, that group was there only one under time pressure frantically stackoverflowing their way into zmq connections issues. Other groups did not spend so much time on SO. I think this means that scientists are more used to numpy APIs than network-programming. And, as I said, Twitter API is rate-limited, so impossible to test under time pressure.
The tournament videos are generated from live screenshots (Rike's idea) taken during the tournament, so no problem.
|
Expression of the year for me: "stackoverflowing your way into something" 🥇 :) |
You wish. The screenshots are done days after the school with code from this branch ( master...Debilski:snapshots that has to be rebased and fine-tuned that it does not run too fast, of course ) and I have to sit there and rewatch it all for an hour, making sure that no window pops up that obscures the Tk frame. I’d happily implement a better solution but unless we change to a qt-based viewer (at least for generating the replay – but I don’t like that it would look differently then) I don’t see it really. For reference, the conversion command to get a video from the pngs is |
But why not saving a png for every frame from tk and than use ffmpeg to create the video? We did that years ago and your complaint back then was that it was not elegant ...
|
Wasn’t the thing that Tk could only do postscript output that turned out to be really ugly? All the other solutions I found do screenshotting as well, and I predict that this is not going to work well if it is done during a tournament. (Problems with the correct timing, repeated frames when starting/stopping, what to do when a frame is resized …) |
The question of how this year's tournament was re-created remains unanswered... =) |
Ok, here is the recipe:
(and adds some sleeps for good measure so that the Tk window has properly refreshed)
|
I understand why you keep the Mac specific stuff on a separate branch and I hereby promise ( #531 ) I will explore the TK-dump-to-file features to get rid of this horror. But, please, what does it mean that |
Yeah, the fix is badly needed but it should be done properly and not with thrown-in sleeps until it works. #453 |
A group of students came up with a bot implementation that talks over the network to a separate machine, and receives commands from there. This is relatively easy to implement, but it is quite hard to implement right: there are all sort of problems with synchronization between the keyboard on the remote machine and the server listening on the bot side. The group using this technique did not succeed to implement a bot that works well, but we should nonetheless make this illegal.
For one, it makes it impossible to re-run the same game (human input is lost, IP-addresses change), and second is arguably "cheating".
How to do this properly is not clear, though, and requires some thought.
The text was updated successfully, but these errors were encountered: