tab program description
Short Description
formulas for writing a tab program...
Description
Thispaperisintendedasatechnicalexplanation,includingpossibleformulas,fordesigninga newdebatetabulationprogrambasedonamatrixoptimizationalgorithm.Ihavespentalotof timeexperimentingwithdifferentformulasa timeexperimentingw ithdifferentformulasandhavearrivedattheo ndhavearrivedattheonesIthinkworkb nesIthinkworkbest.Iam, est.Iam, however,notacomputer however,notacomputerprogramm programmer.Ifanyonewant er.Ifanyonewantsto stodevel developa opaprog programbased rambasedon on these ideas,pleasedosoandsharewiththecom ideas,pleasedosoand sharewiththecommunity. munity. Section1:HowaMatrixOptimizationWorks Thekeyideathatmustbeunderstoodis Thekeyideathatmustbeundersto odisthatcurre thatcurrentalgorit ntalgorithmsforpairing hmsforpairing,whetherdoneby ,whetherdoneby handonnotecardsorbyacomputerprogram,aresequentia handonnotecardsorbyacom puterprogram,aresequentialnotsimultaneous.Forexam lnotsimultaneous.Forexample,in ple,in onecurrentversionof onecurrentversionof apower-matchin apower-matchingalgorithm galgorithm,debaters ,debaters areranked from toptobottom, thenthedebatersarematchedtogethertwo-by-two:firstplacedebatessecond,thirddebates fourth fourth, , and soon.If amatch amatch isprohibi isprohibited ted bytournam bytournament ent rules— rules— for examp example, le, the firstand firstand secondplacedebatersarefromthesameschool—thenthenextdebaterispicked,andfirst placedebatesthird. Everycurrentalgorithmusessomekindofsequentialprocess.Thelimitationisthatonlyone variab variable le can be consid considere ered, d, even even if that that one variab variable le is often often compos composed ed of severa several l differ different ent measur measures. es. For examp example, le, a debate debater’s r’s place place in the tourna tournamen ment t is a variab variable, le, which which might might be composedofthemeasureswin-lossrecord,speakerpoints,opponentwins,etc.Itisimpossible forasequentialalgorithmtobalancetwovariablesatonce,suchasgeographyandskilllevel. All All a sequ sequen enti tial al algo algori rith thm m can can do is occa occasi sion onal ally ly stri strike ke a pote potent ntia ial l matc match h for for viol violat atin ing g one one criter criterion ion or anothe another, r, e.g e.g. . elimina eliminatin ting g a match match becau because se the two debate debaters rs are from from the same same state. Asimultaneousalgorithmcanoptimizeseveralvariablesatonce.Thebasicoutlineofsuchan algori algorithm thm issimpleto issimpleto descri describe: be: step1 step1 isto assign assign apoint value, value, orscore,base orscore,basedon don asmany asmany variablesasdesired variablesasdesired,to ,to everypossiblematc everypossiblematch;step2 h;step2istopickthe istopickthe pairingthathasthehighest pairingthathasthehighest averagepointvaluepermatch.Step2isawell-knownandsolvedproblemincomputerscience (see (see Hungar Hungarian ian algori algorithm thm).There ).Therefor fore, e, the only only proble problem m to solve solve is how to assign assign a score score to everymatch. Step1generatesamatrix,listingdebatersbyrowandbycolumn.Inaneven,side-constrained round,theteams round,theteamsdueAffirma dueAffirmativecoul tivecouldbelistedineachrow,and dbelistedineachrow,andtheteamsdueNega theteamsdueNegativeare tiveare listedbycolumn.Inanoddround,theteamscanberandomlyassignedtoeitherhalf,orthe programcouldassignteamsfromthesameschooltothesameside,sincetheyareblockedand cannotdebateeachother.Usingvariablesstoredforeachteam,theprogramcanpopulatethe
matrixwithdifferentscoresforeachpossiblematch.Inthecasewheretheteamsareblocked, thescoreshouldbesetto0.Instep2,thep thescoreshouldbeset to0.Instep2,theprogrampicksou rogrampicksouttheoptimalsetofm ttheoptimalsetofmatches. atches. Section2:ParticularFormulasforParticularUses Formula1:StrengthofSchedule Theproblemwithahigh-highorhigh-lowpairingmethodisthatthestrengthofschedulecan stillvarywidely,evenwithinabracket.Asevidence,lookattheopponentwinscolumninthe finalresultsofa finalresultsofa tourname tournament;withi nt;withinthesamebracke nthesamebracket,say4-2s,oppon t,say4-2s,opponentwinscanvary entwinscanvaryfrom from thelowteenstothehightwenties.Theproblemisthatthemethodmatchesteamsbyonlyone variable–strength(record,points)–andcannotconsiderasecondvariable–schedulestrength –atthesametime. –atthesametime. Thisisnoproblemforamatrixoptimizationmethod.ForapotentialmatchbetweenteamsA s A and s B ,andalsothe andB,theprogramneeds andB,theprogramneedstouseonlythestrength touseonlythestrengthsofteamsAandB, softeamsAandB, s
{
} ,andofteamB, { s } and oftheset { s s
strengthsoftheprioropponentsofteamA, sC s D s E theprogramcalculates ! A oftheset
{ s
B
,
,
sC s D s E
,
,
,
,...
N
!
,...
B
A
,
sO s P
,
N
,
sO s P
,
,
} .Then } .Each
,...
,...
potentialmatchisscoredby
(1.1)
score score sos =
2 1 !
A
+
1 !
B
withahigherscorebeingbetter.Therefore,thismethodlooksforth withahigherscorebeingbetter. Therefore,thismethodlooksfortheopponentforteamAtha eopponentforteamAthat t most most increa increases ses the standa standard rd deviat deviation ion of its oppone opponent nt set – i.e., i.e., that that most most balan balances ces out its schedule–andlikewiseforteamB.Usingtheharmo schedule–andlikewiseforteamB.Usingtheharmonicmeantocombin nicmeantocombinethesetwostandar ethesetwostandard d deviationsensuresthatonlymatchesthatbalanceoutbothteams’schedulescanreceivehigh scores. Strengthcouldbemeasuredinanyway:winsalone;winsplusafractionforspeakerpoints;or pointsfortheteam’srankorderoutofthenteamsatthetournament,wherefirstplace=n points,second=n–1,…,andlast=n–n=0.(Mypreferredwaytomeasureateam’sstrength isdiscussedinalatersection.)Thestrengt isdiscussedinalatersec tion.)Thestrengthswouldneedtobeup hswouldneedtobeupdatedaftereveryrou datedaftereveryround. nd.
VariantA Themethodforstrength-of-schedulepairingsstatedaboveignoresbrackets.Indeed,becauseit istryingtopusheveryteamtoanequallybalancedsched istryingtopusheveryteam toanequallybalancedschedule,themethodstatedabo ule,themethodstatedabovewillturn vewillturn atournamentintoakindofpartialroundrobin.Eachteamwillfaceopponentsfromthetop, middle,andbottombrackets. Tocorrectthis,anadditionalfactor, wins A ! wins B ,needstobeconsidered.Toforcewithinbracketpairings,thescoringneedstobeadjustedsuchthatthebestone-bracketpull-upmatch hasalowerscorethantheworstwithin-bracketpairing.Inthisway,theprogramwillchoosea pull-u pull-up p match match only only ifit isnecessar isnecessarybecau ybecausea sea bracke bracket t has anunevennumb anunevennumberof erof teams. teams. The programwillthenchoosethebestpossiblepull-upmatch.Itisalsoworthconsideringmultiple brac bracke ket t pull pull-u -ups ps as well. well. Alth Althou ough gh thes these e are are rare rare, , some someti time mes s they they are are nece necess ssar ary y at smal small l tour tourna name ment nts s with with only only a few few part partic icip ipat atin ing g scho school ols. s. It is not not diff diffic icul ult t to have have the the prog progra ram m considerthesemult considerthesemultiplebrack iplebrackets,too.Thebesttwo-b ets,too.Thebesttwo-brack racketpull-up etpull-upshouldhavealowerscore shouldhavealowerscore thantheworstone-bracketpull-up,andsoon. Ifstrengthisturnedintoa0.01to1scale(forexample,bydividingteamrankpointsbyn),then thehigheststandarddeviationpossibleis0.5,andthereforethehighestpossiblescorefora matchis0.5.Thescoringformula matchis0.5.Thescoringformulacouldbeadjustedto couldbeadjustedto
(1.2)
score sos.brackets =
2 1 !
A
+
1
(
+ 0.5 ! rounds " wins " wins A B
)
!
B
Thiswouldshiftthescalingup.After5rounds,forexample,afive-bracketpull-upmatchwould bescored0.01to0.5,afour-bracketpull-upwouldbescored bescored0.01to0.5,afour-bra cketpull-upwouldbescored0.51to1,…,andawithin-brack 0.51to1,…,andawithin-bracket et matchwouldbescored2.51to3.Withinbrackets,theprogramwouldstilltrytopushteamsto equallybalancedschedules.Inotherwords,a3-1teamwithaneasyschedulewouldbepaired againstastrong3-1team,whilea3-1teamwithatoughschedulewouldbepairedagainsta weak3-1team.Inthisway,astrength-of-schedulepairinghelpsspeedthesortingprocessby ensuringthatteamsneithercoasttogoodrecordsduetosignificantlyweakerschedulesthan theirbracketnorhavepoorrecordsdueto theirbracketnorhavepoorrecordsduetosignificantlytoughers significantlytougherschedules. chedules.
Formula2:Geographyplusinitialrankings Oneconsiderationforsomestateandnationaltournam Oneconsiderationforsomesta teandnationaltournamentsisgeographicmixing. entsisgeographicmixing.Byrule,some Byrule,some tournamentsblockteamsfrom tournamentsblockteamsfromthesamegeograp thesamegeographicdistrictfromm hicdistrictfrommeeting.(Theseblocks eeting.(Theseblockscanbe canbe treatedjustaswithin-schoolblocksare:byassigningthesematchesazero.)Sometournaments merelywant merelywant toencourage toencourage geographi geographic cmixin mixing.In g.In many manycase cases, s,stat state eandnationa andnational l tournamen tournaments ts mightalsoliketo mightalsoliketo runapartialround robin,whereeveryteamdebat robin,whereeveryteamdebatessometop,middle essometop,middle,and ,and bottombracketteams(perhap bottombracketteams(perhapsbasedonrankin sbasedonrankingsfromtheregularsea gsfromtheregularseason). son). Theformula(1.1)outlinedabovealreadyrunsapartialroundrobin.Themeasureofstrength could comefromregularseason comefromregularseason pointsandnot pointsandnot varyduringthetournam varyduringthetournament. ent. Allthatneedsto beaddedis ameasureofgeograph ameasureofgeographicdiversity icdiversity.The .Thekeyconsid keyconsideratio erationis nis thedistancebetween thedistancebetween teams.Ifgeographicdistrictsareused,teamswithinadistrictcouldbeassigneda“distance”of zero;teamsinadjacentdistricts,adistanceof1;andteamsinnon-adjacentdistricts,adistance of2.Alternatively,theprogramcoulduseeachschool’sZIPcode,findlongitudeandlatitude data,andassigntheactualdistancebetweentwoteams.Nomatterhowdistanceismeasured, themethodof themethodof assigning assigning ascoreforgeographicdiversit ascoreforgeographicdiversityis yis thesame. Forapotentialmatchof Forapotentialmatchof teamAandteamB,whenteamAhadtheprioropponentCandteamBhadtheprioropponent
{
}
D,theprogramwouldlookup d AB d AC d AB d BC d BD ,thedistancebetweeneachcombination ,
,
,
,
ofteamslisted.Theaveragedistancecrea ofteamslisted.Theaveragedistancecreatedbythisma tedbythismatchwouldbe tchwouldbe
(2.1)
d avg =
6 2
d AB
1 +
d AC
1 +
d AD
1 +
d BC
1 +
d BD
whereahigherscoreindicatemoregeographicspread.Theuseoftheharmonicmeanensures thatonlymatcheswherealldistancesarelongreceivehighscores.Thisfactorcouldbeusedin atournamentonitsownasawaytopairrounds,especiallyforrounds1and2,oritcouldbe combinedwithafactorforstrengthofschedule. Formula3:Judges Themostexcitingapplicationofmatrixoptimizationisjudgeassignment.Ifthetournamenthas collectedeachteam’sjudgingpreferences,thesecanbeusedtoassigneachdebateamutually preferredjudge.Afterthedebatematcheshavepaired,theprogramwouldbuildamatrixof eachdebateversuseachjudge.IfteamAgavejudgejapreferenceof j A andteamBgavehera
preferenceof j preferenceof j B (usuallyona1=mostpreferredto6=strikescale),thenthescorefordebate ABtobegivenjudgejis
(3.1)
judge score =
1 j A
2
j
+ 2 B
whereahigherscoreindicatesamorepreferredjud whereahigherscoreindic atesamorepreferredjudge.Ifatournam ge.Ifatournamenthassurplusjudges enthassurplusjudges,then ,then several“blank”roundswillneedtobeaddedtomakethematrixsquare.Theseblankrounds shouldbescoredby
(3.2)
judge score =
1 3 + rdsremain
theinverseoftheroundsofcommitmentajudgehasremaining.Thiswillputthejudgeswith thefewestroundsofcommit thefewestroundsofcommitment mentremainin remainingintoa gintoaroun roundoff,andit doff,andit willpushjudgeswiththe willpushjudgeswiththe mostroundsofcommitmentintoactualdebates.Finally,judgeswhohavealreadyseenateam orareblockedfromseeingateamshouldreceivea0forthatround.Thisneedstobeupdated duringatournament. VariantA The above above method method consid considere ered d the prefer preferenc ences es of every every team team equall equally. y. If the goal goal is to give give higherprioritytoteamsinbreakrounds,thentheprogramneedstoincludeamultiplierin(3.1) toinflatethe toinflatethe judgescoresfortheseteams judgescoresfortheseteams.Forexample .Forexample,thisschemecould ,thisschemecouldwork:eitherteam work:eitherteam hastwolosses=4points,eith hastwolosses=4points,eitherteamhas erteamhasonelossbutneith onelossbutneitherhastwo=3points,bot erhastwo=3points,bothteams hteams areundefeated areundefeated= = 2points,andneitherteamcanmake 2points,andneitherteamcanmakeeliminati eliminationrounds onrounds= = 1point.The(3.1) formulawouldbemodifiedto
(3.3)
judge score =
multiplier 2
j A
+2
j B
VariantB Ofcourse,itisalsopossibletoaccomplishsimilargoalswithoutteam Ofcourse,itisalsopossibletoaccomp lishsimilargoalswithoutteam’sjudgepreferences.Ifthe ’sjudgepreferences.Ifthe tournamentranksallthejudgesonanexperiencescale,say,10pointsforveryexperiencedto0 pointsforanovicejudge,thenjudgescoresforeac pointsforanovicejudg e,thenjudgescoresforeachdebatecanbea hdebatecanbeassignedby ssignedby
(3.4)
judge score
=
multiplier ! exp erience
Itwouldmakenosensetoassignthesescoreswithonlytheexperiencevariable,sinceevery roundajudgecouldseewouldhavethesamescore. VariantC Perhapsthemostexcitingoptionisthatalldebatesinalldivisionsofalldebateeventscouldbe consideredsimultaneously.Theprogramwouldcreateamatrixwithalldebatematchesandall judges.Thenewadditional judges.The newadditionalvariablewould variablewould bethe judge’sappropriatenessfor eachdivision for eachevent.Perhapsaninexperiencedjudgewouldbegivenascoreof10(mostappropriate) fornoviceLincolnDouglasdebatebutascoreof0(inappropriate)forvarsitypolicydebate.This is,inessence,thesamethingasanexperiencescore,butgivenforeverydivisionandevent. Theprogramwouldusejudgesinthemostap Theprogramwouldusejudgesinthemostappropriatedivisionsandeventsw propriatedivisionsandeventswheretheycanstill heretheycanstill judgedebates, butif buti ftheyare theyare blockedagainst allthe all theteamsin teamsin thatdivision orevent, or event,thenthe thenthe programwouldseamlesslyslipthejudg programwouldseamlesslyslipthejudgesintothenextbestd esintothenextbestdivisionorevent. ivisionorevent. Tomaketheformulacomplete,theprogramwouldalsoneedtoconsiderwhichdivisionand eventhadthehighestpriorityforappropriatejudges.Giventhespeedandtechnicaldemands, thehighestpriorityeventwouldmostlikelyb thehighestpriorityevent wouldmostlikelybepolicydebate.Th epolicydebate.Theformulawouldthen eformulawouldthenbe be (3.5)
judge score
=
priority div.ev ! appropriateness
Thiscouldbecombinedwiththemultiplierforbreakroundsorevenmutualpreferencescores, aslongasthesewereusedinalldivisionsofallevents. VariantD Thesamemethodcanbeusedforassigningjudgingpanels.Thejudgeswouldbeassignedone byone.Ifthetournamentusesthree-judgepanels,theprogramwoulddividethejudgesinto threepools threepools and and a fourth fourth set ofunusedjudge ofunusedjudges.Thepools s.Thepools couldbe couldbe divide dividedin din any any number number of ways: ways:geog geography raphy,experienc ,experience,stylistic e,stylistic preference preferences,sex, s,sex,age,etc.Eachpoolwouldbe age,etc.Eachpoolwouldbe assigned assigned usingthematrixoptimizationmethod. Formula4:IEs Itisalsopossibletousematrixoptimizationtosetu Itisalsopossibletousema trixoptimizationtosetupIEpanelsusingmu pIEpanelsusingmultiplevariables.TheIErs ltiplevariables.TheIErs wouldneedtobeaddedtothepanelonebyone.
Section3:ABetterMeasureofTeamStrength Thebettermeasur Thebettermeasureof eofteam teamstrength strengthI I havecomeupwithis havecomeupwithis weightedwins. weightedwins.If If teamA teamA defeats defeats teamsB,C,andD,teamA’sweightedw teamsB,C,andD,teamA’sweightedwinswouldbe3+winsofB+ inswouldbe3+winsofB+winsofC+winsofD.I winsofC+winsofD.Inthis nthis way,teamAearnsadditionalwinsforthestrengthofitsdefeatedopponents.IfteamAlosesto teamsEandF,teamA’sweightedlosseswouldbe2+lossesofE+lossesofF.TeamAearnsits additionallossesifitlosestoweakopponents.Theratio
w.wins w.wins + w.losses
measuresateam’s
strengthona0to1scale. TheweightedwinsratioisNOTthesamethingasopponentwins.Opponentwinsmeasuresthe strengthofateam’sschedule;weightedwinsconsidersthestrengthofopponentstoadjustthe measureofateam’sstrength.
View more...
Comments