Comments (15)
Most likely no, since once you go beyond about 15 strategies, the simulation starts taking a while to complete anyways. I’d assume as long as you don’t intentionally timeout the simulation it should be fine
from prisonersdilemmatournament.
yep, but it's important for predictive and simulating strategies to avoid taking too long to know what is too long
from prisonersdilemmatournament.
From the website:
-I will read through each .py file before running it, and I will run each .py file alongside a dummy player before entering it in the arena. This is to protect against infinite loops and malicious exploits.
-If I have any suspicion that you're trying to break the rules in any way, by using disallowed libraries, or trying to read or write any files, or being intentionally inefficient with loops or sleep() commands, I reserve the right to disqualify you from the tournament.
Looks like if it's intentionally slow then you'll be disqualified, but if there's a rhyme or reason to why you're doing a bunch of calculations it should be fine.
from prisonersdilemmatournament.
that doesn't take into account simulation based strategies, which do use loops but can be stopped after a specific amount of iterations or a maximum timeout
from prisonersdilemmatournament.
Those strategies would probably be frowned along unless they used statistics. See #11
from prisonersdilemmatournament.
?
Why would they, those kind of strategies do not use any magical knowledge or langage specific knowledge like #11 would use.
I'm talking rather classical adversarial algorithms (min max, monte carlo, whatever), they only use statistics, they just generate some using predictive strategies
from prisonersdilemmatournament.
oh
from prisonersdilemmatournament.
I'd probably set what you think would be a reasonable iteration number or timeout for going against a few hundred strategies and leave a comment in your code saying "Edit this parameter if it's taking too long."
from prisonersdilemmatournament.
Since the compute time of the hole tournament increases quadratic by amount of strats. A limit of 2 sec per turn should be more then enough.
Remember he has to run this multiple (100 or more) times to get a scientific result.
from prisonersdilemmatournament.
oh I'm more around around 2ms per round right now.
Btw, if the dev is reading this, think about parallelizing the matches using the multiprocessing base library, you will reduce drastically the computation time.
the tqdm library can also give a pretty useful loading bar to watch the progress and an ETA :p
from prisonersdilemmatournament.
Oh shoot, this is a good discussion topic, and not one I'd thought enough about before! Yeah, if you're at 2ms per round, then you should be fine. I guess I would be concerned if you went over 10ms or so?
Also, I really should consider parallelizing matches. If it starts to take a while a 15 submissions, and it's O(n^2) to run a tournament, and there's 400 submissions now, that is a bit of a problem! But multiple threads should help out with that.
from prisonersdilemmatournament.
Honestly, what would anybody write that takes 2ms per call?
Even a way too large NN for this purpose runs in 3.584e-05 s per call (18x faster than 2 ms).
from prisonersdilemmatournament.
If it starts to take a while a 15 submissions, and it's O(n^2) to run a tournament
by “a while” I mean about 5 seconds. Not a super long time but it could really increase once you have a few hundred
from prisonersdilemmatournament.
Honestly, what would anybody write that takes 2ms per call?
Even a way too large NN for this purpose runs in 3.584e-05 s per call (18x faster than 2 ms).
Won't go into the details and I optimized my strategy near .8 ms ( 8e-04 s ) since then, hence approx 0.2s for a 200 rounds game.
But tbh the comparison is not fair, neural networks are pretty fast to run, of course a simple feed forward calculation won't need much time to run. Their only real expensive time cost being the training time.
If you need examples of time constrained strategy calculation algorithms, take a look at the way chess is dealt with using monte carlo simulations or genetic algorithms, codingame has a few pretty cool problems you can solve with those approaches
from prisonersdilemmatournament.
Oh shoot, this is a good discussion topic, and not one I'd thought enough about before! Yeah, if you're at 2ms per round, then you should be fine. I guess I would be concerned if you went over 10ms or so?
Also, I really should consider parallelizing matches. If it starts to take a while a 15 submissions, and it's O(n^2) to run a tournament, and there's 400 submissions now, that is a bit of a problem! But multiple threads should help out with that.
Also threads won't do much, this is CPU bound, threads in base python cannot be parallelized due to the GIL, you will need multiple processes in order to accelerate the computations.
see https://docs.python.org/3/library/multiprocessing.html
from prisonersdilemmatournament.
Related Issues (20)
- Analysis and performance
- Submission without a Google account? HOT 1
- After the deadline in a few hours, please feel free to USE THIS THREAD TO SHARE YOUR STRATEGIES, since the fear of them being stolen will be gone HOT 42
- I left a print() HOT 5
- Name associated with Google account being appended to filename when uploading to the google form HOT 2
- I made a POV version of the game HOT 1
- Has anyone successfully done a resubmission? HOT 20
- Will ALL duplicates be removed, including random? HOT 17
- Submission period is over for everyone now! HOT 2
- The "research", as seen from evidence left in the submission form and web page HOT 3
- Potential Exploit I haven't seen discussed yet.
- For everyone who's not subscribed to carykh on YouTube HOT 14
- Predictions :D HOT 10
- Update from Cary! (I implemented subprocesses) HOT 7
- I got stupid... HOT 4
- Update from Cary (2021-06-15) (Long and not urgent, so you don't have to read it) HOT 21
- A cheater got to first place (and got caught). HOT 11
- Detecting Kingmaker and Minion strats HOT 5
- Releasing results.txt in order to simulate different metas HOT 4
- Update from Cary on 2021-06-29 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prisonersdilemmatournament.