Construct a pairing from 1 of 3 options: random, rating based, and confidence.
for rating based, pair them against ones with close ratings, but still random
for confidence, have 1 be the item with lowest confidence and have 2 be random. this will quickly stabilize things added mid comp. Remember that the lowest confidence is the one with the highest number, because the number means that the thing can be + or - the confidence value.
maybe split the pairing generation into a separate function? I'm not sure
To make sure that each pairing is only submitted once to prevent cheating, each pairing should have a unique id. Can probably just be an auto increment from sql. Submit a pairing to [id]_h2h with a blank winner as a placeholder. We have to do this to prevent bad actors from spamming post requests that have a result when they didn't actually have those choices.
Construct a pairing from 1 of 3 options: random, rating based, and confidence. for rating based, pair them against ones with close ratings, but still random for confidence, have 1 be the item with lowest confidence and have 2 be random. this will quickly stabilize things added mid comp. Remember that the lowest confidence is the one with the highest number, because the number means that the thing can be + or - the confidence value. maybe split the pairing generation into a separate function? I'm not sure
To make sure that each pairing is only submitted once to prevent cheating, each pairing should have a unique id. Can probably just be an auto increment from sql. Submit a pairing to [id]_h2h with a blank winner as a placeholder. We have to do this to prevent bad actors from spamming post requests that have a result when they didn't actually have those choices.
this could be a helpful resource https://stackoverflow.com/questions/442678/preventing-double-http-post