tab program description

May 13, 2018 | Author: T. Russell Hanes | Category: Algorithms, Program Optimization, Matrix (Mathematics), Formula, Mathematical Concepts
Share Embed Donate


Short Description

formulas for writing a tab program...

Description

Thispaperisintendedasatechnicalexplanation,includingpossibleformulas,fordesigninga newdebatetabulationprogrambasedonamatrixoptimizationalgorithm.Ihavespentalotof timeexperimentingwithdifferentformulasa timeexperimentingw ithdifferentformulasandhavearrivedattheo ndhavearrivedattheonesIthinkworkb nesIthinkworkbest.Iam, est.Iam, however,notacomputer however,notacomputerprogramm programmer.Ifanyonewant er.Ifanyonewantsto stodevel developa opaprog programbased rambasedon on these ideas,pleasedosoandsharewiththecom ideas,pleasedosoand sharewiththecommunity. munity. Section1:HowaMatrixOptimizationWorks Thekeyideathatmustbeunderstoodis Thekeyideathatmustbeundersto odisthatcurre thatcurrentalgorit ntalgorithmsforpairing hmsforpairing,whetherdoneby ,whetherdoneby handonnotecardsorbyacomputerprogram,aresequentia handonnotecardsorbyacom puterprogram,aresequentialnotsimultaneous.Forexam lnotsimultaneous.Forexample,in ple,in onecurrentversionof onecurrentversionof apower-matchin apower-matchingalgorithm galgorithm,debaters ,debaters areranked from toptobottom, thenthedebatersarematchedtogethertwo-by-two:firstplacedebatessecond,thirddebates fourth fourth, , and soon.If amatch amatch isprohibi isprohibited ted bytournam bytournament ent rules— rules— for examp example, le, the firstand firstand secondplacedebatersarefromthesameschool—thenthenextdebaterispicked,andfirst placedebatesthird. Everycurrentalgorithmusessomekindofsequentialprocess.Thelimitationisthatonlyone 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 composedofthemeasureswin-lossrecord,speakerpoints,opponentwins,etc.Itisimpossible forasequentialalgorithmtobalancetwovariablesatonce,suchasgeographyandskilllevel. 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. Asimultaneousalgorithmcanoptimizeseveralvariablesatonce.Thebasicoutlineofsuchan algori algorithm thm issimpleto issimpleto descri describe: be: step1 step1 isto assign assign apoint value, value, orscore,base orscore,basedon don asmany asmany variablesasdesired variablesasdesired,to ,to everypossiblematc everypossiblematch;step2 h;step2istopickthe istopickthe pairingthathasthehighest pairingthathasthehighest averagepointvaluepermatch.Step2isawell-knownandsolvedproblemincomputerscience (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 everymatch. Step1generatesamatrix,listingdebatersbyrowandbycolumn.Inaneven,side-constrained round,theteams round,theteamsdueAffirma dueAffirmativecoul tivecouldbelistedineachrow,and dbelistedineachrow,andtheteamsdueNega theteamsdueNegativeare tiveare listedbycolumn.Inanoddround,theteamscanberandomlyassignedtoeitherhalf,orthe programcouldassignteamsfromthesameschooltothesameside,sincetheyareblockedand cannotdebateeachother.Usingvariablesstoredforeachteam,theprogramcanpopulatethe

matrixwithdifferentscoresforeachpossiblematch.Inthecasewheretheteamsareblocked, thescoreshouldbesetto0.Instep2,thep thescoreshouldbeset to0.Instep2,theprogrampicksou rogrampicksouttheoptimalsetofm ttheoptimalsetofmatches. atches. Section2:ParticularFormulasforParticularUses Formula1:StrengthofSchedule Theproblemwithahigh-highorhigh-lowpairingmethodisthatthestrengthofschedulecan stillvarywidely,evenwithinabracket.Asevidence,lookattheopponentwinscolumninthe finalresultsofa finalresultsofa tourname tournament;withi nt;withinthesamebracke nthesamebracket,say4-2s,oppon t,say4-2s,opponentwinscanvary entwinscanvaryfrom from thelowteenstothehightwenties.Theproblemisthatthemethodmatchesteamsbyonlyone variable–strength(record,points)–andcannotconsiderasecondvariable–schedulestrength  –atthesametime.  –atthesametime. Thisisnoproblemforamatrixoptimizationmethod.ForapotentialmatchbetweenteamsA  s A and s B ,andalsothe andB,theprogramneeds andB,theprogramneedstouseonlythestrength touseonlythestrengthsofteamsAandB, softeamsAandB, s

{

} ,andofteamB, { s } and oftheset { s  s

strengthsoftheprioropponentsofteamA,  sC   s D  s E  theprogramcalculates !  A oftheset

{ s

 B

,

,

 sC   s D  s E 

,

,

,

,...

 N 



,...

 B

 A

,

 sO  s P 

,

 N 

,

 sO  s P 

,

,

} .Then } .Each

,...

,...

potentialmatchisscoredby

(1.1)

 score  score sos =

2 1 ! 

 A

+

1 ! 

 B

withahigherscorebeingbetter.Therefore,thismethodlooksforth withahigherscorebeingbetter. Therefore,thismethodlooksfortheopponentforteamAtha eopponentforteamAthat 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–andlikewiseforteamB.Usingtheharmo schedule–andlikewiseforteamB.Usingtheharmonicmeantocombin nicmeantocombinethesetwostandar ethesetwostandard d deviationsensuresthatonlymatchesthatbalanceoutbothteams’schedulescanreceivehigh scores. Strengthcouldbemeasuredinanyway:winsalone;winsplusafractionforspeakerpoints;or pointsfortheteam’srankorderoutofthenteamsatthetournament,wherefirstplace=n points,second=n–1,…,andlast=n–n=0.(Mypreferredwaytomeasureateam’sstrength isdiscussedinalatersection.)Thestrengt isdiscussedinalatersec tion.)Thestrengthswouldneedtobeup hswouldneedtobeupdatedaftereveryrou datedaftereveryround. nd.

VariantA Themethodforstrength-of-schedulepairingsstatedaboveignoresbrackets.Indeed,becauseit istryingtopusheveryteamtoanequallybalancedsched istryingtopusheveryteam toanequallybalancedschedule,themethodstatedabo ule,themethodstatedabovewillturn vewillturn atournamentintoakindofpartialroundrobin.Eachteamwillfaceopponentsfromthetop, middle,andbottombrackets. Tocorrectthis,anadditionalfactor, wins A ! wins B ,needstobeconsidered.Toforcewithinbracketpairings,thescoringneedstobeadjustedsuchthatthebestone-bracketpull-upmatch hasalowerscorethantheworstwithin-bracketpairing.Inthisway,theprogramwillchoosea pull-u pull-up p match match only only ifit isnecessar isnecessarybecau ybecausea sea bracke bracket t has anunevennumb anunevennumberof erof teams. teams. The programwillthenchoosethebestpossiblepull-upmatch.Itisalsoworthconsideringmultiple 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 considerthesemult considerthesemultiplebrack iplebrackets,too.Thebesttwo-b ets,too.Thebesttwo-brack racketpull-up etpull-upshouldhavealowerscore shouldhavealowerscore thantheworstone-bracketpull-up,andsoon. Ifstrengthisturnedintoa0.01to1scale(forexample,bydividingteamrankpointsbyn),then thehigheststandarddeviationpossibleis0.5,andthereforethehighestpossiblescorefora matchis0.5.Thescoringformula matchis0.5.Thescoringformulacouldbeadjustedto couldbeadjustedto

(1.2)

 score sos.brackets =

2 1 ! 

 A

+

1

(

+ 0.5 ! rounds " wins " wins  A  B

)



 B

Thiswouldshiftthescalingup.After5rounds,forexample,afive-bracketpull-upmatchwould bescored0.01to0.5,afour-bracketpull-upwouldbescored bescored0.01to0.5,afour-bra cketpull-upwouldbescored0.51to1,…,andawithin-brack 0.51to1,…,andawithin-bracket et matchwouldbescored2.51to3.Withinbrackets,theprogramwouldstilltrytopushteamsto equallybalancedschedules.Inotherwords,a3-1teamwithaneasyschedulewouldbepaired againstastrong3-1team,whilea3-1teamwithatoughschedulewouldbepairedagainsta weak3-1team.Inthisway,astrength-of-schedulepairinghelpsspeedthesortingprocessby ensuringthatteamsneithercoasttogoodrecordsduetosignificantlyweakerschedulesthan theirbracketnorhavepoorrecordsdueto theirbracketnorhavepoorrecordsduetosignificantlytoughers significantlytougherschedules. chedules.

Formula2:Geographyplusinitialrankings Oneconsiderationforsomestateandnationaltournam Oneconsiderationforsomesta teandnationaltournamentsisgeographicmixing. entsisgeographicmixing.Byrule,some Byrule,some tournamentsblockteamsfrom tournamentsblockteamsfromthesamegeograp thesamegeographicdistrictfromm hicdistrictfrommeeting.(Theseblocks eeting.(Theseblockscanbe canbe treatedjustaswithin-schoolblocksare:byassigningthesematchesazero.)Sometournaments merelywant merelywant toencourage toencourage geographi geographic cmixin mixing.In g.In many manycase cases, s,stat state eandnationa andnational l tournamen tournaments ts mightalsoliketo mightalsoliketo runapartialround robin,whereeveryteamdebat robin,whereeveryteamdebatessometop,middle essometop,middle,and ,and bottombracketteams(perhap bottombracketteams(perhapsbasedonrankin sbasedonrankingsfromtheregularsea gsfromtheregularseason). son). Theformula(1.1)outlinedabovealreadyrunsapartialroundrobin.Themeasureofstrength could comefromregularseason comefromregularseason pointsandnot pointsandnot varyduringthetournam varyduringthetournament. ent. Allthatneedsto beaddedis ameasureofgeograph ameasureofgeographicdiversity icdiversity.The .Thekeyconsid keyconsideratio erationis nis thedistancebetween thedistancebetween teams.Ifgeographicdistrictsareused,teamswithinadistrictcouldbeassigneda“distance”of zero;teamsinadjacentdistricts,adistanceof1;andteamsinnon-adjacentdistricts,adistance of2.Alternatively,theprogramcoulduseeachschool’sZIPcode,findlongitudeandlatitude data,andassigntheactualdistancebetweentwoteams.Nomatterhowdistanceismeasured, themethodof themethodof assigning assigning ascoreforgeographicdiversit ascoreforgeographicdiversityis yis thesame. Forapotentialmatchof Forapotentialmatchof teamAandteamB,whenteamAhadtheprioropponentCandteamBhadtheprioropponent

{

}

D,theprogramwouldlookup d  AB d  AC  d  AB d  BC  d  BD ,thedistancebetweeneachcombination ,

,

,

,

ofteamslisted.Theaveragedistancecrea ofteamslisted.Theaveragedistancecreatedbythisma tedbythismatchwouldbe tchwouldbe

(2.1)

d avg  =

6 2

d  AB

1 +

d  AC 

1 +

d  AD

1 +

d  BC 

1 +

d  BD

whereahigherscoreindicatemoregeographicspread.Theuseoftheharmonicmeanensures thatonlymatcheswherealldistancesarelongreceivehighscores.Thisfactorcouldbeusedin atournamentonitsownasawaytopairrounds,especiallyforrounds1and2,oritcouldbe combinedwithafactorforstrengthofschedule. Formula3:Judges Themostexcitingapplicationofmatrixoptimizationisjudgeassignment.Ifthetournamenthas collectedeachteam’sjudgingpreferences,thesecanbeusedtoassigneachdebateamutually preferredjudge.Afterthedebatematcheshavepaired,theprogramwouldbuildamatrixof eachdebateversuseachjudge.IfteamAgavejudgejapreferenceof j A andteamBgavehera

preferenceof j preferenceof  j B (usuallyona1=mostpreferredto6=strikescale),thenthescorefordebate ABtobegivenjudgejis

(3.1)

 judge score =

1  j A

2

 j

+ 2  B

whereahigherscoreindicatesamorepreferredjud whereahigherscoreindic atesamorepreferredjudge.Ifatournam ge.Ifatournamenthassurplusjudges enthassurplusjudges,then ,then several“blank”roundswillneedtobeaddedtomakethematrixsquare.Theseblankrounds shouldbescoredby

(3.2)

 judge score =

1 3 + rdsremain



theinverseoftheroundsofcommitmentajudgehasremaining.Thiswillputthejudgeswith thefewestroundsofcommit thefewestroundsofcommitment mentremainin remainingintoa gintoaroun roundoff,andit doff,andit willpushjudgeswiththe willpushjudgeswiththe mostroundsofcommitmentintoactualdebates.Finally,judgeswhohavealreadyseenateam orareblockedfromseeingateamshouldreceivea0forthatround.Thisneedstobeupdated duringatournament. VariantA 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 higherprioritytoteamsinbreakrounds,thentheprogramneedstoincludeamultiplierin(3.1) toinflatethe toinflatethe judgescoresfortheseteams judgescoresfortheseteams.Forexample .Forexample,thisschemecould ,thisschemecouldwork:eitherteam work:eitherteam hastwolosses=4points,eith hastwolosses=4points,eitherteamhas erteamhasonelossbutneith onelossbutneitherhastwo=3points,bot erhastwo=3points,bothteams hteams areundefeated areundefeated= = 2points,andneitherteamcanmake 2points,andneitherteamcanmakeeliminati eliminationrounds onrounds= = 1point.The(3.1) formulawouldbemodifiedto

(3.3)

 judge score =

multiplier  2

j A

+2

j B

VariantB Ofcourse,itisalsopossibletoaccomplishsimilargoalswithoutteam Ofcourse,itisalsopossibletoaccomp lishsimilargoalswithoutteam’sjudgepreferences.Ifthe ’sjudgepreferences.Ifthe tournamentranksallthejudgesonanexperiencescale,say,10pointsforveryexperiencedto0 pointsforanovicejudge,thenjudgescoresforeac pointsforanovicejudg e,thenjudgescoresforeachdebatecanbea hdebatecanbeassignedby ssignedby

(3.4)

 judge score

=

multiplier ! exp erience

Itwouldmakenosensetoassignthesescoreswithonlytheexperiencevariable,sinceevery roundajudgecouldseewouldhavethesamescore. VariantC Perhapsthemostexcitingoptionisthatalldebatesinalldivisionsofalldebateeventscouldbe consideredsimultaneously.Theprogramwouldcreateamatrixwithalldebatematchesandall  judges.Thenewadditional  judges.The newadditionalvariablewould variablewould bethe judge’sappropriatenessfor eachdivision for eachevent.Perhapsaninexperiencedjudgewouldbegivenascoreof10(mostappropriate) fornoviceLincolnDouglasdebatebutascoreof0(inappropriate)forvarsitypolicydebate.This is,inessence,thesamethingasanexperiencescore,butgivenforeverydivisionandevent. Theprogramwouldusejudgesinthemostap Theprogramwouldusejudgesinthemostappropriatedivisionsandeventsw propriatedivisionsandeventswheretheycanstill heretheycanstill  judgedebates, butif buti ftheyare theyare blockedagainst allthe all theteamsin teamsin thatdivision orevent, or event,thenthe thenthe programwouldseamlesslyslipthejudg programwouldseamlesslyslipthejudgesintothenextbestd esintothenextbestdivisionorevent. ivisionorevent. Tomaketheformulacomplete,theprogramwouldalsoneedtoconsiderwhichdivisionand eventhadthehighestpriorityforappropriatejudges.Giventhespeedandtechnicaldemands, thehighestpriorityeventwouldmostlikelyb thehighestpriorityevent wouldmostlikelybepolicydebate.Th epolicydebate.Theformulawouldthen eformulawouldthenbe be (3.5)

 judge score

=

priority div.ev ! appropriateness

Thiscouldbecombinedwiththemultiplierforbreakroundsorevenmutualpreferencescores, aslongasthesewereusedinalldivisionsofallevents. VariantD Thesamemethodcanbeusedforassigningjudgingpanels.Thejudgeswouldbeassignedone byone.Ifthetournamentusesthree-judgepanels,theprogramwoulddividethejudgesinto threepools threepools and and a fourth fourth set ofunusedjudge ofunusedjudges.Thepools s.Thepools couldbe couldbe divide dividedin din any any number number of ways: ways:geog geography raphy,experienc ,experience,stylistic e,stylistic preference preferences,sex, s,sex,age,etc.Eachpoolwouldbe age,etc.Eachpoolwouldbe assigned assigned usingthematrixoptimizationmethod. Formula4:IEs Itisalsopossibletousematrixoptimizationtosetu Itisalsopossibletousema trixoptimizationtosetupIEpanelsusingmu pIEpanelsusingmultiplevariables.TheIErs ltiplevariables.TheIErs wouldneedtobeaddedtothepanelonebyone.

Section3:ABetterMeasureofTeamStrength Thebettermeasur Thebettermeasureof eofteam teamstrength strengthI I havecomeupwithis havecomeupwithis weightedwins. weightedwins.If If teamA teamA defeats defeats teamsB,C,andD,teamA’sweightedw teamsB,C,andD,teamA’sweightedwinswouldbe3+winsofB+ inswouldbe3+winsofB+winsofC+winsofD.I winsofC+winsofD.Inthis nthis way,teamAearnsadditionalwinsforthestrengthofitsdefeatedopponents.IfteamAlosesto teamsEandF,teamA’sweightedlosseswouldbe2+lossesofE+lossesofF.TeamAearnsits additionallossesifitlosestoweakopponents.Theratio

w.wins w.wins + w.losses

measuresateam’s

strengthona0to1scale. TheweightedwinsratioisNOTthesamethingasopponentwins.Opponentwinsmeasuresthe strengthofateam’sschedule;weightedwinsconsidersthestrengthofopponentstoadjustthe measureofateam’sstrength.

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF