Skip to content
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

[FEATURE] Additional dynamic scoring parameters #213

Open
jdabtieu opened this issue Jun 1, 2023 · 1 comment
Open

[FEATURE] Additional dynamic scoring parameters #213

jdabtieu opened this issue Jun 1, 2023 · 1 comment
Assignees
Labels
priority high To be fixed/implemented immediately
Milestone

Comments

@jdabtieu
Copy link
Owner

jdabtieu commented Jun 1, 2023

Currently we have max pts, min pts, num users before decay, but we should also have a variable controlling decay rate that can be adjusted based on how many participants are expected

The default (hard coded) is 11, but something like 40 works a lot better for a contest like BxMCTF (500 teams). This should be adjustable

Also, these parameters should be maybe editable mid-contest could cause issues with concurrency.

@jdabtieu
Copy link
Owner Author

diff for bxmctf:

diff --git a/src/helpers.py b/src/helpers.py
index 663ccc2..0448291 100644
--- a/src/helpers.py
+++ b/src/helpers.py
@@ -197,10 +197,10 @@ def update_dyn_score(contest_id, problem_id, update_curr_user=True):
         cid=contest_id, pid=problem_id))
     N_min = check[0]["score_min"]
     N_max = check[0]["score_max"]
-    N_users = check[0]["score_users"]
-    d = 11 * math.log(N_max - N_min) + N_users
-    old_points = min(math.ceil(math.e**((d - solves + 1) / 11) + N_min), N_max)
-    new_points = min(math.ceil(math.e**((d - solves) / 11) + N_min), N_max)
+    N_users = 20 # check[0]["score_users"]
+    d = 40 * math.log(N_max - N_min) + N_users
+    old_points = min(math.ceil(math.e**((d - solves + 1) / 40) + N_min), N_max)
+    new_points = min(math.ceil(math.e**((d - solves) / 40) + N_min), N_max)
     point_diff = new_points - old_points
 
     # Set new point value of problem

@jdabtieu jdabtieu added the priority high To be fixed/implemented immediately label Jul 4, 2023
@jdabtieu jdabtieu added this to the v4.2.0 milestone Oct 29, 2023
@jdabtieu jdabtieu self-assigned this Nov 29, 2023
@jdabtieu jdabtieu modified the milestones: v4.2.0, v4.3.0 Dec 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority high To be fixed/implemented immediately
Projects
None yet
Development

No branches or pull requests

1 participant