Goal of the project is to determine a probable winner of world cup playing with Fifa Ranking of the teams.
python3 -m venv .
pip3 install -r requirements.txt
pip install --upgrade pip
python3 qwc.py -t <number of times to run simulation> -p <minimum different of points to determimne a winner>
It will run the simulation a number of times that the -r parameter will indicate. Another parameter is the number of points. If the difference between two teams is bigger than this number in the FIFA ranking, the best one will win. Otherwise the system will randomly select one winner between the two. All the results are stored in a SQLite database inside the datastore directory so you can run stats after the simulations runs.
SELECT first_place,
100* (cast(COUNT(*) as real))/ (SELECT cast(COUNT(*) as real) FROM simulation) AS percentage
FROM simulation
GROUP BY first_place
ORDER BY 2 DESC;