added frc elo notebook

This commit is contained in:
Jacob Levine 2019-03-09 14:05:47 -06:00
parent 047f682030
commit 053001186e
8 changed files with 533 additions and 2 deletions

View File

@ -0,0 +1,6 @@
{
"cells": [],
"metadata": {},
"nbformat": 4,
"nbformat_minor": 2
}

View File

@ -0,0 +1,6 @@
2,3
6,5
5,5
5,8
6,6
6,8
1 2 3
2 6 5
3 5 5
4 5 8
5 6 6
6 6 8

View File

@ -0,0 +1,53 @@
4,6,4,5
3,4,8,8
2,8,3,0
5,8,4,7
4,0,9,6
2,0,1,6
5,3,5,0
2,0,2,2
4,8
6,6,5,1
2,1,5,1
2,0,3,9
2,2,5,2
1,1,1
6,8,2,3
2,1,3,6
4,2,9,2
5,8,2,2
7,6,0,8
2,3,5,8
4,2,4,1
3,1,1,0
7,6,0,9
5,1,2,5
6,9,0,6
9,3,0
2,0,6,2
3,0,6,7
4,7,8,7
2,7,0,9
7,5,6,0
5,9,3,4
4,7,0,2
5,1,4,8
1,6
4,1,5,6
1,8,8,4
1,6,7,5
1,7,9,7
2,4,5,1
7,7,3,8
1,0,1
1,7,3,9
3,7,3,4
1,7,3,6
3,0,6,1
2,7,2,5
7,2,3,7
3,6,9,5
6,9,6,8
1,7,8,1
4,2,9,6
2,3,3,8
1 4,6,4,5
2 3,4,8,8
3 2,8,3,0
4 5,8,4,7
5 4,0,9,6
6 2,0,1,6
7 5,3,5,0
8 2,0,2,2
9 4,8
10 6,6,5,1
11 2,1,5,1
12 2,0,3,9
13 2,2,5,2
14 1,1,1
15 6,8,2,3
16 2,1,3,6
17 4,2,9,2
18 5,8,2,2
19 7,6,0,8
20 2,3,5,8
21 4,2,4,1
22 3,1,1,0
23 7,6,0,9
24 5,1,2,5
25 6,9,0,6
26 9,3,0
27 2,0,6,2
28 3,0,6,7
29 4,7,8,7
30 2,7,0,9
31 7,5,6,0
32 5,9,3,4
33 4,7,0,2
34 5,1,4,8
35 1,6
36 4,1,5,6
37 1,8,8,4
38 1,6,7,5
39 1,7,9,7
40 2,4,5,1
41 7,7,3,8
42 1,0,1
43 1,7,3,9
44 3,7,3,4
45 1,7,3,6
46 3,0,6,1
47 2,7,2,5
48 7,2,3,7
49 3,6,9,5
50 6,9,6,8
51 1,7,8,1
52 4,2,9,6
53 2,3,3,8

View File

@ -0,0 +1,191 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import operator\n",
"import csv\n",
"#constants\n",
"k=100\n",
"rdf=400\n",
"\n",
"def win_prob(yas,oas):\n",
" return 1/(1+10**(1/rdf*(oas-yas)))\n",
"def new_score(oscore,yas,oas,outcome):\n",
" return (oscore)+k*(outcome-win_prob(yas,oas))\n",
"\n",
"def readFile(filepath):\n",
"\n",
" with open(filepath) as csvfile:\n",
" lines = csv.reader(csvfile, delimiter=',', quotechar='|')\n",
" data = []\n",
" try:\n",
" for row in lines:\n",
" data.append((', '.join(row)).split(\", \"))\n",
" except:\n",
" pass\n",
"\n",
" return data\n"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"sb=readFile('scoreboard.csv')\n",
"teams=set([])\n",
"for i in sb:\n",
" teams.add(i[2])\n",
" teams.add(i[3])\n",
" teams.add(i[4])\n",
" teams.add(i[5])\n",
" teams.add(i[6])\n",
" teams.add(i[7])\n",
"list(teams)\n",
"tsd={}\n",
"for i in list(teams):\n",
" tsd[i]=500\n",
"for i in sb:\n",
" ras=tsd[i[2]]+tsd[i[3]]+tsd[i[4]]\n",
" bas=tsd[i[5]]+tsd[i[6]]+tsd[i[7]]\n",
" outcome=0\n",
" if i[8]>i[9]:\n",
" outcome=1\n",
" elif i[9]==i[8]:\n",
" outcome=.5\n",
" for j in range(2,5,1):\n",
" tsd[i[j]]=new_score(tsd[i[j]],ras,bas,outcome)\n",
" for j in range(5,8,1):\n",
" tsd[i[j]]=new_score(tsd[i[j]],bas,ras,1-outcome)\n",
" \n",
"rankinfs = sorted(tsd.items(), key=operator.itemgetter(1), reverse=True) "
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[('5934', 833.1830859510761),\n",
" ('48', 739.9728094005745),\n",
" ('16', 705.9551102513088),\n",
" ('3061', 702.9024075826381),\n",
" ('3695', 700.1366129603175),\n",
" ('2338', 696.932652524603),\n",
" ('4096', 652.7038522070818),\n",
" ('3488', 648.9766694246662),\n",
" ('4156', 638.0881039843185),\n",
" ('101', 626.9019952260375),\n",
" ('6823', 613.1453027540894),\n",
" ('930', 610.7992869961017),\n",
" ('2062', 608.0647276785079),\n",
" ('2830', 600.0239706519325),\n",
" ('5847', 589.0350788865741),\n",
" ('1736', 584.367394696335),\n",
" ('2358', 577.5524744241919),\n",
" ('5822', 575.4792058357157),\n",
" ('1675', 569.9944280943398),\n",
" ('111', 559.5150813478114),\n",
" ('1797', 537.9429025884093),\n",
" ('5148', 533.9623603303631),\n",
" ('1781', 519.5609268991466),\n",
" ('6651', 516.3195829730869),\n",
" ('6906', 501.7408783344565),\n",
" ('2022', 482.2765218696747),\n",
" ('7237', 474.4616019824547),\n",
" ('1884', 468.87487164611116),\n",
" ('2039', 467.0990375388428),\n",
" ('2451', 462.70812165138807),\n",
" ('7608', 462.0188420364676),\n",
" ('1739', 459.00590084129664),\n",
" ('2252', 456.43201385653043),\n",
" ('2151', 439.4118535382677),\n",
" ('4702', 435.5729578944645),\n",
" ('7738', 423.16353418538296),\n",
" ('4296', 420.5085609998351),\n",
" ('3734', 418.47615429198186),\n",
" ('7609', 409.29347746836567),\n",
" ('2709', 403.9793052336144),\n",
" ('3067', 402.77020998279653),\n",
" ('2136', 386.0798688817299),\n",
" ('5350', 383.4109800245315),\n",
" ('5125', 377.1609505922246),\n",
" ('4292', 357.43188113820975),\n",
" ('3110', 344.8643460008074),\n",
" ('2725', 332.21429556184444),\n",
" ('4645', 329.6452389079341),\n",
" ('6968', 329.08368400289095),\n",
" ('4241', 315.12115012426335),\n",
" ('4787', 288.64374620808815),\n",
" ('7560', 279.7779164676232),\n",
" ('2016', 247.25607506869346)]"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"rankinfs"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.5"
}
},
"nbformat": 4,
"nbformat_minor": 2
}

View File

@ -0,0 +1,57 @@
Match,Time,Red1,Red2,Red3,Blue1,Blue2,Blue3,RedScore,BlueScore
Qualification 1  ,Fri 3/8 - 9:00 AM,7560,3061,3488,1675,2451,5148,37,26
Qualification 2  ,Fri 3/8 - 9:09 AM,7608,1884,2338,4702,2151,111,23,33
Qualification 3  ,Fri 3/8 - 9:18 AM,2830,7609,101,2039,4292,16,45,35
Qualification 4  ,Fri 3/8 - 9:27 AM,6968,1736,4096,4645,3067,2252,40,20
Qualification 5  ,Fri 3/8 - 9:36 AM,4156,2016,3695,2022,3110,3734,46,29
Qualification 6  ,Fri 3/8 - 9:45 AM,5934,5822,1739,7738,2062,4296,38,33
Qualification 7  ,Fri 3/8 - 9:54 AM,930,5125,4787,7237,6906,1781,37,41
Qualification 8  ,Fri 3/8 - 10:03 AM,2725,5847,5350,2709,1797,4241,25,24
Qualification 9  ,Fri 3/8 - 10:12 AM,2358,6823,2136,48,6651,3734,17,40
Qualification 10  ,Fri 3/8 - 10:21 AM,3067,7608,5148,2062,4292,5822,15,39
Qualification 11  ,Fri 3/8 - 10:30 AM,111,6968,4787,16,2022,1675,41,63
Qualification 12  ,Fri 3/8 - 10:39 AM,4702,7738,2830,6906,2725,2016,52,24
Qualification 13  ,Fri 3/8 - 10:48 AM,2709,2358,7609,101,930,6823,16,42
Qualification 14  ,Fri 3/8 - 10:56 AM,2136,5934,3695,1736,7237,2151,45,25
Qualification 15  ,Fri 3/8 - 11:04 AM,3110,1781,2252,1797,2338,3488,35,65
Qualification 16  ,Fri 3/8 - 11:12 AM,48,4156,4241,4296,1884,3061,48,34
Qualification 17  ,Fri 3/8 - 11:20 AM,2039,6651,5125,4096,7560,5350,31,23
Qualification 18  ,Fri 3/8 - 11:28 AM,5847,2451,16,4645,1739,7237,62,15
Qualification 19  ,Fri 3/8 - 11:36 AM,3734,3067,1797,7609,5148,5934,18,31
Qualification 20  ,Fri 3/8 - 11:44 AM,5822,2725,4241,2338,4156,930,20,55
Qualification 21  ,Fri 3/8 - 11:52 AM,6968,2016,2709,7608,2151,6823,12,14
Qualification 22,Fri 3/8 - 1:00 PM,1736,7560,1739,4292,5350,48,43,58
Qualification 23,Fri 3/8 - 1:09 PM,2062,1781,2022,2451,4096,6651,35,45
Qualification 24,Fri 3/8 - 1:18 PM,111,4296,3488,4787,2136,2039,49,27
Qualification 25,Fri 3/8 - 1:27 PM,101,3061,5847,2252,2830,6906,53,40
Qualification 26,Fri 3/8 - 1:36 PM,1675,4645,4702,3695,3110,7738,15,71
Qualification 27,Fri 3/8 - 1:44 PM,1736,1884,2358,2016,5125,7560,25,23
Qualification 28,Fri 3/8 - 1:52 PM,4156,2725,6651,3488,7237,3067,42,39
Qualification 29,Fri 3/8 - 2:00 PM,3734,5350,2151,6906,2062,101,18,36
Qualification 30,Fri 3/8 - 2:08 PM,5847,7738,6823,2338,111,4096,54,58
Qualification 31,Fri 3/8 - 2:16 PM,2709,48,4702,5934,2039,2252,20,49
Qualification 32,Fri 3/8 - 2:24 PM,1884,930,2830,1797,1675,6968,61,49
Qualification 33,Fri 3/8 - 2:32 PM,7609,1739,3695,5148,4241,4787,85,54
Qualification 34,Fri 3/8 - 2:40 PM,5125,4645,2022,3061,2136,4292,37,39
Qualification 35,Fri 3/8 - 2:48 PM,2451,2358,7608,4296,16,3110,37,18
Qualification 36,Fri 3/8 - 2:56 PM,1781,2039,3734,5822,7237,5847,30,61
Qualification 37,Fri 3/8 - 3:04 PM,3488,5350,930,1884,3695,111,52,54
Qualification 38,Fri 3/8 - 3:12 PM,2016,5934,2338,7609,7560,4156,66,24
Qualification 39,Fri 3/8 - 3:20 PM,2252,6651,2136,4787,7608,1739,27,23
Qualification 40,Fri 3/8 - 3:28 PM,4096,4702,5148,2358,4241,101,37,28
Qualification 41,Fri 3/8 - 3:36 PM,3110,5822,2451,48,6968,6906,42,68
Qualification 42,Fri 3/8 - 3:44 PM,16,1736,1781,7738,3061,2725,56,43
Qualification 43,Fri 3/8 - 3:52 PM,1797,5125,4292,6823,2709,2062,32,42
Qualification 44,Fri 3/8 - 4:00 PM,2022,4296,3067,2151,2830,1675,26,31
Qualification 45,Fri 3/8 - 4:08 PM,4645,48,5847,5148,3488,2016,63,48
Qualification 46,Fri 3/8 - 4:16 PM,3110,4096,930,3061,4787,5934,42,56
Qualification 47,Fri 3/8 - 4:24 PM,2725,6823,2451,7608,3695,2039,29,57
Qualification 48,Fri 3/8 - 4:32 PM,2062,1675,4156,101,4702,2136,40,31
Qualification 49,Fri 3/8 - 4:40 PM,2022,7738,7237,5350,2252,7609,51,37
Qualification 50,Fri 3/8 - 4:48 PM,7560,4296,2151,1781,1797,4645,21,39
Qualification 51,Fri 3/8 - 4:56 PM,2338,1736,5822,2830,2709,6651,68,37
Qualification 52,Fri 3/8 - 5:04 PM,6906,1739,2358,4292,6968,1884,33,29
Qualification 53,Fri 3/8 - 5:12 PM,111,16,3067,4241,3734,5125,65,41
Qualification 54,Fri 3/8 - 5:20 PM,3061,1675,48,7609,5847,7608,65,42
Qualification 55,Fri 3/8 - 5:28 PM,6651,2016,2062,930,2252,4296,43,77
Qualification 56,Fri 3/8 - 5:36 PM,4292,5148,2725,2151,4787,3110,19,3
1 Match Time Red1 Red2 Red3 Blue1 Blue2 Blue3 RedScore BlueScore
2 Qualification 1   Fri 3/8 - 9:00 AM 7560 3061 3488 1675 2451 5148 37 26
3 Qualification 2   Fri 3/8 - 9:09 AM 7608 1884 2338 4702 2151 111 23 33
4 Qualification 3   Fri 3/8 - 9:18 AM 2830 7609 101 2039 4292 16 45 35
5 Qualification 4   Fri 3/8 - 9:27 AM 6968 1736 4096 4645 3067 2252 40 20
6 Qualification 5   Fri 3/8 - 9:36 AM 4156 2016 3695 2022 3110 3734 46 29
7 Qualification 6   Fri 3/8 - 9:45 AM 5934 5822 1739 7738 2062 4296 38 33
8 Qualification 7   Fri 3/8 - 9:54 AM 930 5125 4787 7237 6906 1781 37 41
9 Qualification 8   Fri 3/8 - 10:03 AM 2725 5847 5350 2709 1797 4241 25 24
10 Qualification 9   Fri 3/8 - 10:12 AM 2358 6823 2136 48 6651 3734 17 40
11 Qualification 10   Fri 3/8 - 10:21 AM 3067 7608 5148 2062 4292 5822 15 39
12 Qualification 11   Fri 3/8 - 10:30 AM 111 6968 4787 16 2022 1675 41 63
13 Qualification 12   Fri 3/8 - 10:39 AM 4702 7738 2830 6906 2725 2016 52 24
14 Qualification 13   Fri 3/8 - 10:48 AM 2709 2358 7609 101 930 6823 16 42
15 Qualification 14   Fri 3/8 - 10:56 AM 2136 5934 3695 1736 7237 2151 45 25
16 Qualification 15   Fri 3/8 - 11:04 AM 3110 1781 2252 1797 2338 3488 35 65
17 Qualification 16   Fri 3/8 - 11:12 AM 48 4156 4241 4296 1884 3061 48 34
18 Qualification 17   Fri 3/8 - 11:20 AM 2039 6651 5125 4096 7560 5350 31 23
19 Qualification 18   Fri 3/8 - 11:28 AM 5847 2451 16 4645 1739 7237 62 15
20 Qualification 19   Fri 3/8 - 11:36 AM 3734 3067 1797 7609 5148 5934 18 31
21 Qualification 20   Fri 3/8 - 11:44 AM 5822 2725 4241 2338 4156 930 20 55
22 Qualification 21   Fri 3/8 - 11:52 AM 6968 2016 2709 7608 2151 6823 12 14
23 Qualification 22 Fri 3/8 - 1:00 PM 1736 7560 1739 4292 5350 48 43 58
24 Qualification 23 Fri 3/8 - 1:09 PM 2062 1781 2022 2451 4096 6651 35 45
25 Qualification 24 Fri 3/8 - 1:18 PM 111 4296 3488 4787 2136 2039 49 27
26 Qualification 25 Fri 3/8 - 1:27 PM 101 3061 5847 2252 2830 6906 53 40
27 Qualification 26 Fri 3/8 - 1:36 PM 1675 4645 4702 3695 3110 7738 15 71
28 Qualification 27 Fri 3/8 - 1:44 PM 1736 1884 2358 2016 5125 7560 25 23
29 Qualification 28 Fri 3/8 - 1:52 PM 4156 2725 6651 3488 7237 3067 42 39
30 Qualification 29 Fri 3/8 - 2:00 PM 3734 5350 2151 6906 2062 101 18 36
31 Qualification 30 Fri 3/8 - 2:08 PM 5847 7738 6823 2338 111 4096 54 58
32 Qualification 31 Fri 3/8 - 2:16 PM 2709 48 4702 5934 2039 2252 20 49
33 Qualification 32 Fri 3/8 - 2:24 PM 1884 930 2830 1797 1675 6968 61 49
34 Qualification 33 Fri 3/8 - 2:32 PM 7609 1739 3695 5148 4241 4787 85 54
35 Qualification 34 Fri 3/8 - 2:40 PM 5125 4645 2022 3061 2136 4292 37 39
36 Qualification 35 Fri 3/8 - 2:48 PM 2451 2358 7608 4296 16 3110 37 18
37 Qualification 36 Fri 3/8 - 2:56 PM 1781 2039 3734 5822 7237 5847 30 61
38 Qualification 37 Fri 3/8 - 3:04 PM 3488 5350 930 1884 3695 111 52 54
39 Qualification 38 Fri 3/8 - 3:12 PM 2016 5934 2338 7609 7560 4156 66 24
40 Qualification 39 Fri 3/8 - 3:20 PM 2252 6651 2136 4787 7608 1739 27 23
41 Qualification 40 Fri 3/8 - 3:28 PM 4096 4702 5148 2358 4241 101 37 28
42 Qualification 41 Fri 3/8 - 3:36 PM 3110 5822 2451 48 6968 6906 42 68
43 Qualification 42 Fri 3/8 - 3:44 PM 16 1736 1781 7738 3061 2725 56 43
44 Qualification 43 Fri 3/8 - 3:52 PM 1797 5125 4292 6823 2709 2062 32 42
45 Qualification 44 Fri 3/8 - 4:00 PM 2022 4296 3067 2151 2830 1675 26 31
46 Qualification 45 Fri 3/8 - 4:08 PM 4645 48 5847 5148 3488 2016 63 48
47 Qualification 46 Fri 3/8 - 4:16 PM 3110 4096 930 3061 4787 5934 42 56
48 Qualification 47 Fri 3/8 - 4:24 PM 2725 6823 2451 7608 3695 2039 29 57
49 Qualification 48 Fri 3/8 - 4:32 PM 2062 1675 4156 101 4702 2136 40 31
50 Qualification 49 Fri 3/8 - 4:40 PM 2022 7738 7237 5350 2252 7609 51 37
51 Qualification 50 Fri 3/8 - 4:48 PM 7560 4296 2151 1781 1797 4645 21 39
52 Qualification 51 Fri 3/8 - 4:56 PM 2338 1736 5822 2830 2709 6651 68 37
53 Qualification 52 Fri 3/8 - 5:04 PM 6906 1739 2358 4292 6968 1884 33 29
54 Qualification 53 Fri 3/8 - 5:12 PM 111 16 3067 4241 3734 5125 65 41
55 Qualification 54 Fri 3/8 - 5:20 PM 3061 1675 48 7609 5847 7608 65 42
56 Qualification 55 Fri 3/8 - 5:28 PM 6651 2016 2062 930 2252 4296 43 77
57 Qualification 56 Fri 3/8 - 5:36 PM 4292 5148 2725 2151 4787 3110 19 3

View File

@ -0,0 +1,4 @@
gmkR7hN4D1fQguey5X5V48d3PhO2,strongMediumTeleop,jouGPhPF0qME5wNIbd86MzYFsGw2,size,nTG6cThsi9TB9mTkcwuo5bKEo9B3,speed,strategy,teamDBRef,sandstormCross,sandstormCrossBonus,lowRocketSuccessTeleop,cargoSuccessTeleop,functional,fillChoice,strongMedium,fillChoiceTeleop,contrubution,hiRocketSuccessTeleop,match,endingHab,startingHatch
"{'contribution': 'Weak', 'notes': 'team ups, robot malfunction VOID THIS INFO', 'fillChoice': '', 'cargoSuccess': '', 'cargoSuccessTeleop': '', 'strongMedium': '', 'teamDBRef': 'team-1675', 'hiRocketSuccessTeleop': '', 'speed': 'Slow', 'lowRocketSuccess': '', 'match': 'match-1', 'size': 'Medium', 'fillChoiceTeleop': '', 'strongMediumTeleop': '', 'lowRocketSuccessTeleop': '', 'startingHatch': 'Hab II', 'hiRocketSuccess': ''}",,"{'notes': '', 'contribution': 'Weak', 'cargoSuccess': '', 'fillChoice': '', 'strongMedium': '', 'cargoSuccessTeleop': '', 'teamDBRef': 'team-1675', 'speed': '', 'hiRocketSuccessTeleop': '', 'lowRocketSuccess': '', 'match': 'match-1', 'size': 'Large', 'fillChoiceTeleop': '', 'strongMediumTeleop': '', 'lowRocketSuccessTeleop': '', 'startingHatch': 'Hab II', 'hiRocketSuccess': ''}",,,,,,,,,,,,,,,,,,
,Hatch,,IDK,,slow,Hatch panels for rocket,team-1675,None,None,High,N/A,Yes,None,Neither,Low Rocket,Weak,N/A,match-26,L1,IDK
,,,,"{'notes': '', 'contribution': 'Equal', 'fillChoice': 'Cargo', 'strategy': 'pinning opponent and placing hatches on rocket', 'strongMedium': 'Hatch', 'cargoSuccessTeleop': '', 'teamDBRef': 'team-1675', 'speed': 'Medium', 'hiRocketSuccessTeleop': 'High', 'size': 'Large', 'match': 'match-54', 'fillChoiceTeleop': 'Low Rocket', 'strongMediumTeleop': 'Hatch', 'endingHab': 'Hab 1', 'functional': 'Yes', 'lowRocketSuccessTeleop': 'High', 'startingHatch': 'Hab I'}",,,,,,,,,,,,,,,,
1 gmkR7hN4D1fQguey5X5V48d3PhO2 strongMediumTeleop jouGPhPF0qME5wNIbd86MzYFsGw2 size nTG6cThsi9TB9mTkcwuo5bKEo9B3 speed strategy teamDBRef sandstormCross sandstormCrossBonus lowRocketSuccessTeleop cargoSuccessTeleop functional fillChoice strongMedium fillChoiceTeleop contrubution hiRocketSuccessTeleop match endingHab startingHatch
2 {'contribution': 'Weak', 'notes': 'team ups, robot malfunction VOID THIS INFO', 'fillChoice': '', 'cargoSuccess': '', 'cargoSuccessTeleop': '', 'strongMedium': '', 'teamDBRef': 'team-1675', 'hiRocketSuccessTeleop': '', 'speed': 'Slow', 'lowRocketSuccess': '', 'match': 'match-1', 'size': 'Medium', 'fillChoiceTeleop': '', 'strongMediumTeleop': '', 'lowRocketSuccessTeleop': '', 'startingHatch': 'Hab II', 'hiRocketSuccess': ''} {'notes': '', 'contribution': 'Weak', 'cargoSuccess': '', 'fillChoice': '', 'strongMedium': '', 'cargoSuccessTeleop': '', 'teamDBRef': 'team-1675', 'speed': '', 'hiRocketSuccessTeleop': '', 'lowRocketSuccess': '', 'match': 'match-1', 'size': 'Large', 'fillChoiceTeleop': '', 'strongMediumTeleop': '', 'lowRocketSuccessTeleop': '', 'startingHatch': 'Hab II', 'hiRocketSuccess': ''}
3 Hatch IDK slow Hatch panels for rocket team-1675 None None High N/A Yes None Neither Low Rocket Weak N/A match-26 L1 IDK
4 {'notes': '', 'contribution': 'Equal', 'fillChoice': 'Cargo', 'strategy': 'pinning opponent and placing hatches on rocket', 'strongMedium': 'Hatch', 'cargoSuccessTeleop': '', 'teamDBRef': 'team-1675', 'speed': 'Medium', 'hiRocketSuccessTeleop': 'High', 'size': 'Large', 'match': 'match-54', 'fillChoiceTeleop': 'Low Rocket', 'strongMediumTeleop': 'Hatch', 'endingHab': 'Hab 1', 'functional': 'Yes', 'lowRocketSuccessTeleop': 'High', 'startingHatch': 'Hab I'}

View File

@ -0,0 +1,191 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import operator\n",
"import csv\n",
"#constants\n",
"k=100\n",
"rdf=400\n",
"\n",
"def win_prob(yas,oas):\n",
" return 1/(1+10**(1/rdf*(oas-yas)))\n",
"def new_score(oscore,yas,oas,outcome):\n",
" return (oscore)+k*(outcome-win_prob(yas,oas))\n",
"\n",
"def readFile(filepath):\n",
"\n",
" with open(filepath) as csvfile:\n",
" lines = csv.reader(csvfile, delimiter=',', quotechar='|')\n",
" data = []\n",
" try:\n",
" for row in lines:\n",
" data.append((', '.join(row)).split(\", \"))\n",
" except:\n",
" pass\n",
"\n",
" return data\n"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"sb=readFile('scoreboard.csv')\n",
"teams=set([])\n",
"for i in sb:\n",
" teams.add(i[2])\n",
" teams.add(i[3])\n",
" teams.add(i[4])\n",
" teams.add(i[5])\n",
" teams.add(i[6])\n",
" teams.add(i[7])\n",
"list(teams)\n",
"tsd={}\n",
"for i in list(teams):\n",
" tsd[i]=500\n",
"for i in sb:\n",
" ras=tsd[i[2]]+tsd[i[3]]+tsd[i[4]]\n",
" bas=tsd[i[5]]+tsd[i[6]]+tsd[i[7]]\n",
" outcome=0\n",
" if i[8]>i[9]:\n",
" outcome=1\n",
" elif i[9]==i[8]:\n",
" outcome=.5\n",
" for j in range(2,5,1):\n",
" tsd[i[j]]=new_score(tsd[i[j]],ras,bas,outcome)\n",
" for j in range(5,8,1):\n",
" tsd[i[j]]=new_score(tsd[i[j]],bas,ras,1-outcome)\n",
" \n",
"rankinfs = sorted(tsd.items(), key=operator.itemgetter(1), reverse=True) "
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[('5934', 833.1830859510761),\n",
" ('48', 739.9728094005745),\n",
" ('16', 705.9551102513088),\n",
" ('3061', 702.9024075826381),\n",
" ('3695', 700.1366129603175),\n",
" ('2338', 696.932652524603),\n",
" ('4096', 652.7038522070818),\n",
" ('3488', 648.9766694246662),\n",
" ('4156', 638.0881039843185),\n",
" ('101', 626.9019952260375),\n",
" ('6823', 613.1453027540894),\n",
" ('930', 610.7992869961017),\n",
" ('2062', 608.0647276785079),\n",
" ('2830', 600.0239706519325),\n",
" ('5847', 589.0350788865741),\n",
" ('1736', 584.367394696335),\n",
" ('2358', 577.5524744241919),\n",
" ('5822', 575.4792058357157),\n",
" ('1675', 569.9944280943398),\n",
" ('111', 559.5150813478114),\n",
" ('1797', 537.9429025884093),\n",
" ('5148', 533.9623603303631),\n",
" ('1781', 519.5609268991466),\n",
" ('6651', 516.3195829730869),\n",
" ('6906', 501.7408783344565),\n",
" ('2022', 482.2765218696747),\n",
" ('7237', 474.4616019824547),\n",
" ('1884', 468.87487164611116),\n",
" ('2039', 467.0990375388428),\n",
" ('2451', 462.70812165138807),\n",
" ('7608', 462.0188420364676),\n",
" ('1739', 459.00590084129664),\n",
" ('2252', 456.43201385653043),\n",
" ('2151', 439.4118535382677),\n",
" ('4702', 435.5729578944645),\n",
" ('7738', 423.16353418538296),\n",
" ('4296', 420.5085609998351),\n",
" ('3734', 418.47615429198186),\n",
" ('7609', 409.29347746836567),\n",
" ('2709', 403.9793052336144),\n",
" ('3067', 402.77020998279653),\n",
" ('2136', 386.0798688817299),\n",
" ('5350', 383.4109800245315),\n",
" ('5125', 377.1609505922246),\n",
" ('4292', 357.43188113820975),\n",
" ('3110', 344.8643460008074),\n",
" ('2725', 332.21429556184444),\n",
" ('4645', 329.6452389079341),\n",
" ('6968', 329.08368400289095),\n",
" ('4241', 315.12115012426335),\n",
" ('4787', 288.64374620808815),\n",
" ('7560', 279.7779164676232),\n",
" ('2016', 247.25607506869346)]"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"rankinfs"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.5"
}
},
"nbformat": 4,
"nbformat_minor": 2
}

View File

@ -1,5 +1,4 @@
Match,Time,Red1,Red2,Red3,Blue1,Blue2,Blue3,RedScore,BlueScore
Qualification 1  ,Fri 3/8 - 9:00 AM,7560,3061,3488,1675,2451,5148,37,26
Qualification 1  ,Fri 3/8 - 9:00 AM,7560,3061,3488,1675,2451,5148,37,26
Qualification 2  ,Fri 3/8 - 9:09 AM,7608,1884,2338,4702,2151,111,23,33
Qualification 3  ,Fri 3/8 - 9:18 AM,2830,7609,101,2039,4292,16,45,35
Qualification 4  ,Fri 3/8 - 9:27 AM,6968,1736,4096,4645,3067,2252,40,20
@ -55,3 +54,27 @@ Qualification 53,Fri 3/8 - 5:12 PM,111,16,3067,4241,3734,5125,65,41
Qualification 54,Fri 3/8 - 5:20 PM,3061,1675,48,7609,5847,7608,65,42
Qualification 55,Fri 3/8 - 5:28 PM,6651,2016,2062,930,2252,4296,43,77
Qualification 56,Fri 3/8 - 5:36 PM,4292,5148,2725,2151,4787,3110,19,3
Qualification 57,Sat 3/9 - 9:00 AM,2136,6906,1884,4096,16,2709,15,42
Qualification 58,Sat 3/9 - 9:09 AM,4156,101,1797,2451,111,1736,99,59
Qualification 59,Sat 3/9 - 9:18 AM,7237,3695,7560,3067,7738,6968,52,27
Qualification 60,Sat 3/9 - 9:27 AM,3734,3488,2830,1739,4702,5125,60,35
Qualification 61,Sat 3/9 - 9:36 AM,2039,2022,4241,4645,2338,2358,35,41
Qualification 62,Sat 3/9 - 9:44 AM,6823,5934,16,5822,5350,1781,77,48
Qualification 63,Sat 3/9 - 9:52 AM,7237,4096,4292,4296,2016,1675,43,35
Qualification 64,Sat 3/9 - 10:00 AM,7609,2151,7738,5125,3488,2451,29,44
Qualification 65,Sat 3/9 - 10:08 AM,2725,7608,1797,1739,101,2022,43,58
Qualification 66,Sat 3/9 - 10:16 AM,3695,3067,48,1781,111,2709,66,49
Qualification 67,Sat 3/9 - 10:24 AM,4241,3110,6906,6651,6823,1736,27,46
Qualification 68,Sat 3/9 - 10:32 AM,4702,930,5822,5847,2136,7560,65,14
Qualification 69,Sat 3/9 - 10:40 AM,4787,4156,4645,2358,2830,5350,39,42
Qualification 70,Sat 3/9 - 10:48 AM,5148,2062,3061,6968,2039,2338,56,34
Qualification 71,Sat 3/9 - 10:56 AM,1884,2252,2451,5934,3734,2725,40,46
Qualification 72,Sat 3/9 - 11:04 AM,2151,2022,4096,930,48,1736,30,72
Qualification 73,Sat 3/9 - 11:12 AM,4241,4292,7608,3488,1781,7738,28,71
Qualification 74,Sat 3/9 - 11:20 AM,16,1797,3061,6651,3695,4702,82,47
Qualification 75,Sat 3/9 - 11:28 AM,5350,6906,4645,3067,2338,7609,15,53
Qualification 76,Sat 3/9 - 11:36 AM,1675,2709,2039,1739,3734,4156,41,41
Qualification 77,Sat 3/9 - 11:44 AM,2830,4787,7237,6823,5148,1884,44,69
Qualification 78,Sat 3/9 - 11:52 AM,5125,101,6968,5934,5847,4296,35,59
Qualification 79,Sat 3/9 - 12:00 PM,2252,111,2062,7560,2358,3110,56,33
Qualification 80,Sat 3/9 - 12:08 PM,2016,7609,4241,2136,5822,1797,32,48

1 Match Qualification 1   Time Fri 3/8 - 9:00 AM Red1 7560 Red2 3061 Red3 3488 Blue1 1675 Blue2 2451 Blue3 5148 RedScore 37 BlueScore 26
Qualification 1   Fri 3/8 - 9:00 AM 7560 3061 3488 1675 2451 5148 37 26
2 Qualification 2   Qualification 2   Fri 3/8 - 9:09 AM Fri 3/8 - 9:09 AM 7608 7608 1884 1884 2338 2338 4702 4702 2151 2151 111 111 23 23 33 33
3 Qualification 3   Qualification 3   Fri 3/8 - 9:18 AM Fri 3/8 - 9:18 AM 2830 2830 7609 7609 101 101 2039 2039 4292 4292 16 16 45 45 35 35
4 Qualification 4   Qualification 4   Fri 3/8 - 9:27 AM Fri 3/8 - 9:27 AM 6968 6968 1736 1736 4096 4096 4645 4645 3067 3067 2252 2252 40 40 20 20
54 Qualification 54 Qualification 54 Fri 3/8 - 5:20 PM Fri 3/8 - 5:20 PM 3061 3061 1675 1675 48 48 7609 7609 5847 5847 7608 7608 65 65 42 42
55 Qualification 55 Qualification 55 Fri 3/8 - 5:28 PM Fri 3/8 - 5:28 PM 6651 6651 2016 2016 2062 2062 930 930 2252 2252 4296 4296 43 43 77 77
56 Qualification 56 Qualification 56 Fri 3/8 - 5:36 PM Fri 3/8 - 5:36 PM 4292 4292 5148 5148 2725 2725 2151 2151 4787 4787 3110 3110 19 19 3 3
57 Qualification 57 Sat 3/9 - 9:00 AM 2136 6906 1884 4096 16 2709 15 42
58 Qualification 58 Sat 3/9 - 9:09 AM 4156 101 1797 2451 111 1736 99 59
59 Qualification 59 Sat 3/9 - 9:18 AM 7237 3695 7560 3067 7738 6968 52 27
60 Qualification 60 Sat 3/9 - 9:27 AM 3734 3488 2830 1739 4702 5125 60 35
61 Qualification 61 Sat 3/9 - 9:36 AM 2039 2022 4241 4645 2338 2358 35 41
62 Qualification 62 Sat 3/9 - 9:44 AM 6823 5934 16 5822 5350 1781 77 48
63 Qualification 63 Sat 3/9 - 9:52 AM 7237 4096 4292 4296 2016 1675 43 35
64 Qualification 64 Sat 3/9 - 10:00 AM 7609 2151 7738 5125 3488 2451 29 44
65 Qualification 65 Sat 3/9 - 10:08 AM 2725 7608 1797 1739 101 2022 43 58
66 Qualification 66 Sat 3/9 - 10:16 AM 3695 3067 48 1781 111 2709 66 49
67 Qualification 67 Sat 3/9 - 10:24 AM 4241 3110 6906 6651 6823 1736 27 46
68 Qualification 68 Sat 3/9 - 10:32 AM 4702 930 5822 5847 2136 7560 65 14
69 Qualification 69 Sat 3/9 - 10:40 AM 4787 4156 4645 2358 2830 5350 39 42
70 Qualification 70 Sat 3/9 - 10:48 AM 5148 2062 3061 6968 2039 2338 56 34
71 Qualification 71 Sat 3/9 - 10:56 AM 1884 2252 2451 5934 3734 2725 40 46
72 Qualification 72 Sat 3/9 - 11:04 AM 2151 2022 4096 930 48 1736 30 72
73 Qualification 73 Sat 3/9 - 11:12 AM 4241 4292 7608 3488 1781 7738 28 71
74 Qualification 74 Sat 3/9 - 11:20 AM 16 1797 3061 6651 3695 4702 82 47
75 Qualification 75 Sat 3/9 - 11:28 AM 5350 6906 4645 3067 2338 7609 15 53
76 Qualification 76 Sat 3/9 - 11:36 AM 1675 2709 2039 1739 3734 4156 41 41
77 Qualification 77 Sat 3/9 - 11:44 AM 2830 4787 7237 6823 5148 1884 44 69
78 Qualification 78 Sat 3/9 - 11:52 AM 5125 101 6968 5934 5847 4296 35 59
79 Qualification 79 Sat 3/9 - 12:00 PM 2252 111 2062 7560 2358 3110 56 33
80 Qualification 80 Sat 3/9 - 12:08 PM 2016 7609 4241 2136 5822 1797 32 48