Spaces:
Sleeping
Sleeping
initial commit
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- data/faction-picker-bot/metrics/alchemists charts.png +0 -0
- data/faction-picker-bot/metrics/auren charts.png +0 -0
- data/faction-picker-bot/metrics/chaosmagicians charts.png +0 -0
- data/faction-picker-bot/metrics/cultists charts.png +0 -0
- data/faction-picker-bot/metrics/darklings charts.png +0 -0
- data/faction-picker-bot/metrics/dwarves charts.png +0 -0
- data/faction-picker-bot/metrics/engineers charts.png +0 -0
- data/faction-picker-bot/metrics/fakirs charts.png +0 -0
- data/faction-picker-bot/metrics/giants charts.png +0 -0
- data/faction-picker-bot/metrics/halflings charts.png +0 -0
- data/faction-picker-bot/metrics/mermaids charts.png +0 -0
- data/faction-picker-bot/metrics/nomads charts.png +0 -0
- data/faction-picker-bot/metrics/swarmlings charts.png +0 -0
- data/faction-picker-bot/metrics/witches charts.png +0 -0
- data/faction-picker-bot/model-metrics/alchemists_results.pkl +3 -0
- data/faction-picker-bot/model-metrics/auren_results.pkl +3 -0
- data/faction-picker-bot/model-metrics/chaosmagicians_results.pkl +3 -0
- data/faction-picker-bot/model-metrics/cultists_results.pkl +3 -0
- data/faction-picker-bot/model-metrics/darklings_results.pkl +3 -0
- data/faction-picker-bot/model-metrics/dwarves_results.pkl +3 -0
- data/faction-picker-bot/model-metrics/engineers_results.pkl +3 -0
- data/faction-picker-bot/model-metrics/fakirs_results.pkl +3 -0
- data/faction-picker-bot/model-metrics/giants_results.pkl +3 -0
- data/faction-picker-bot/model-metrics/halflings_results.pkl +3 -0
- data/faction-picker-bot/model-metrics/mermaids_results.pkl +3 -0
- data/faction-picker-bot/model-metrics/nomads_results.pkl +3 -0
- data/faction-picker-bot/model-metrics/swarmlings_results.pkl +3 -0
- data/faction-picker-bot/model-metrics/witches_results.pkl +3 -0
- data/faction-picker-bot/model_metrics.json +1 -0
- data/faction-picker-bot/model_plot_data.csv +41 -0
- data/faction-picker-bot/models/alchemists_model.txt +0 -0
- data/faction-picker-bot/models/auren_model.txt +0 -0
- data/faction-picker-bot/models/chaosmagicians_model.txt +0 -0
- data/faction-picker-bot/models/cultists_model.txt +0 -0
- data/faction-picker-bot/models/darklings_model.txt +0 -0
- data/faction-picker-bot/models/dwarves_model.txt +0 -0
- data/faction-picker-bot/models/engineers_model.txt +0 -0
- data/faction-picker-bot/models/fakirs_model.txt +0 -0
- data/faction-picker-bot/models/giants_model.txt +0 -0
- data/faction-picker-bot/models/halflings_model.txt +0 -0
- data/faction-picker-bot/models/mermaids_model.txt +0 -0
- data/faction-picker-bot/models/nomads_model.txt +0 -0
- data/faction-picker-bot/models/swarmlings_model.txt +0 -0
- data/faction-picker-bot/models/witches_model.txt +0 -0
- faction-picker-bot/.ipynb_checkpoints/creatingVPdata-checkpoint.ipynb +0 -0
- faction-picker-bot/.ipynb_checkpoints/creatingVPdata-diffeats-checkpoint.ipynb +0 -0
- faction-picker-bot/.ipynb_checkpoints/individual_faction_data-checkpoint.ipynb +1087 -0
- faction-picker-bot/.ipynb_checkpoints/make_data-checkpoint.py +178 -0
- faction-picker-bot/.ipynb_checkpoints/shap_metrics-checkpoint.ipynb +6 -0
- faction-picker-bot/.ipynb_checkpoints/testdvc-checkpoint.ipynb +44 -0
data/faction-picker-bot/metrics/alchemists charts.png
ADDED
![]() |
data/faction-picker-bot/metrics/auren charts.png
ADDED
![]() |
data/faction-picker-bot/metrics/chaosmagicians charts.png
ADDED
![]() |
data/faction-picker-bot/metrics/cultists charts.png
ADDED
![]() |
data/faction-picker-bot/metrics/darklings charts.png
ADDED
![]() |
data/faction-picker-bot/metrics/dwarves charts.png
ADDED
![]() |
data/faction-picker-bot/metrics/engineers charts.png
ADDED
![]() |
data/faction-picker-bot/metrics/fakirs charts.png
ADDED
![]() |
data/faction-picker-bot/metrics/giants charts.png
ADDED
![]() |
data/faction-picker-bot/metrics/halflings charts.png
ADDED
![]() |
data/faction-picker-bot/metrics/mermaids charts.png
ADDED
![]() |
data/faction-picker-bot/metrics/nomads charts.png
ADDED
![]() |
data/faction-picker-bot/metrics/swarmlings charts.png
ADDED
![]() |
data/faction-picker-bot/metrics/witches charts.png
ADDED
![]() |
data/faction-picker-bot/model-metrics/alchemists_results.pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ea1789786129fce45584c13a3397ee8cb7307db822a1da5fedafb12c18d5eed0
|
3 |
+
size 1947
|
data/faction-picker-bot/model-metrics/auren_results.pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:708d7177e927fcf83b3d1f5b1555de2e0c61d3de85cfd8a9dc021ad1a428a01a
|
3 |
+
size 1947
|
data/faction-picker-bot/model-metrics/chaosmagicians_results.pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:207ca43e5cba6224b4d5fa094938ad4ae5ddd95cc3d3f3c57e7d26ca9d923b63
|
3 |
+
size 1947
|
data/faction-picker-bot/model-metrics/cultists_results.pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ccbe7b1e90ceafdf6b3be34b4fdcb8906e9611aa4d2f8499705994aa18a44641
|
3 |
+
size 1947
|
data/faction-picker-bot/model-metrics/darklings_results.pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e758e197cdda1240b7642bcf510dda63c7a995c1203df043cc87abeb20e4f531
|
3 |
+
size 1947
|
data/faction-picker-bot/model-metrics/dwarves_results.pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:cc7713332a1d047d3429d706782a7273901234f7629e677f969456b9ddfb0255
|
3 |
+
size 1947
|
data/faction-picker-bot/model-metrics/engineers_results.pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:02d00887350427c6a07fc27bd6f154d7b5e4b804af43e1612bed7203315419b3
|
3 |
+
size 1947
|
data/faction-picker-bot/model-metrics/fakirs_results.pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d812b4bee5209db515f8cc632ff36bfa4edfe3b703f4637f34faadcc47b697fd
|
3 |
+
size 1947
|
data/faction-picker-bot/model-metrics/giants_results.pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1c45ff7bcab64efbd907b48f58d180be20508c3e4c35a0a188360571d4c100e9
|
3 |
+
size 1947
|
data/faction-picker-bot/model-metrics/halflings_results.pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f47587e688ae79c8054292cb9fc14e83fc0dcad4398e46b01e78329ac6585c1d
|
3 |
+
size 1947
|
data/faction-picker-bot/model-metrics/mermaids_results.pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:626399cb4d6513172ca32c191b1ce9171db1ce140b387b3df71c17e42cd9943a
|
3 |
+
size 1947
|
data/faction-picker-bot/model-metrics/nomads_results.pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:28a15fb6da282e424483732eed52f4b26114ddd2cbe1a02e8576be720d255e36
|
3 |
+
size 1947
|
data/faction-picker-bot/model-metrics/swarmlings_results.pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5c999ce2428d138573bc96498b01baed7e59c281e010f1b9bb461e3d0d0ec282
|
3 |
+
size 1947
|
data/faction-picker-bot/model-metrics/witches_results.pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2468e77c5d6ca041e56ea1d5dcc97a845f078b871c583b75fc415f0926dad511
|
3 |
+
size 1947
|
data/faction-picker-bot/model_metrics.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"alchemists": 17.675128486070648, "auren": 19.080928489227144, "chaosmagicians": 19.46938549474033, "cultists": 19.00761903403616, "darklings": 16.87301997476913, "dwarves": 18.991842395304392, "engineers": 21.028359645696742, "fakirs": 18.156050332057664, "giants": 18.29384343801704, "halflings": 18.85417082077842, "mermaids": 18.28377694840633, "nomads": 18.702529060243318, "swarmlings": 19.15995957442542, "witches": 20.259218473315254}
|
data/faction-picker-bot/model_plot_data.csv
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
,alchemists,auren,chaosmagicians,cultists,darklings,dwarves,engineers,fakirs,giants,halflings,mermaids,nomads,swarmlings,witches,step
|
2 |
+
0,648.7720708898261,669.4489452282111,762.2322533573642,687.0629980348449,639.7082456984546,654.1255021734601,769.6754181350328,642.6044298363403,624.2278894424893,686.3085860437354,678.9587843424483,694.1059542935128,720.396653187467,757.6125769177443,0
|
3 |
+
1,637.3292141891817,663.0722057630607,751.8262780416434,679.7462433480741,636.3290969429851,647.3902454701415,760.5686757411795,632.1724146530397,617.2973738377747,679.1175676916363,671.570842531147,689.5701241575272,711.3169576845813,752.9446591114736,1
|
4 |
+
2,628.2725551881837,658.9467961797883,746.0067724741028,673.9077085448572,632.8872637124164,639.2284663240579,748.6682432518876,621.8023103502233,612.6221518871562,673.2100309116455,664.3418032889064,684.0621989319749,702.0881635702716,749.853303732407,2
|
5 |
+
3,617.711208531599,646.4433189780476,740.3258502240238,667.2427418009195,627.9442074499824,631.9188504209125,739.0720495875825,610.8283683277766,608.7998924897995,665.8745757986458,659.7401246038571,680.2066190896799,692.0503354107688,741.5615639922369,3
|
6 |
+
4,610.8450755141429,642.3771791765287,736.3100062635818,662.2796368608252,625.8075722572539,627.5675574623299,731.9591435840516,603.1905874585583,606.4676802427515,661.2280437634356,654.6807792054955,676.7256378644045,686.6179160343556,738.4670791898939,4
|
7 |
+
5,603.2528637141353,636.8104731996839,731.4892200411483,658.7132579901624,622.4489802248954,623.6582688298516,727.1503840691779,599.974867643471,602.0871063197523,657.7623058861408,648.9084795493441,674.3350935260501,679.1587907783195,733.4717951335231,5
|
8 |
+
6,597.2692380967173,631.9945037573879,728.1821502572217,656.0241083978572,619.2344317589026,618.9268814268202,721.6159320866637,594.7282697176723,599.3486390835214,655.0895771177283,644.1741520099541,671.9830641377272,673.2080561593073,729.4665364366599,6
|
9 |
+
7,600.8829869386568,633.5979332321201,730.2221420541675,657.6282171483334,620.3890238213779,620.6746693673872,723.9597810968279,597.7710464807687,601.0434993098472,656.7480858203904,646.257990129086,673.1090865771098,675.687360568262,730.9764432641963,7
|
10 |
+
8,596.8236338296165,626.7278948542381,724.1061683489298,654.9736922516416,617.4892588199425,615.0074724890153,719.3601936180125,595.8389315820715,598.3805477827165,653.957173512589,641.9789113638342,671.671134606839,669.5467326719767,725.7868335443956,8
|
11 |
+
9,592.3765927504709,620.8355893155724,718.6212922561575,651.1247835501217,614.7286188131098,610.3477911978836,715.5662498595609,590.564653781051,595.6339766951634,650.2205908515215,638.1506368353295,669.3612919664854,664.4636090797732,720.967248481557,9
|
12 |
+
10,587.825149451334,617.3216778808569,715.3594046497202,649.3533468576242,612.4308904325915,606.5337985020511,712.215911972959,586.2241728062921,593.710211575739,648.2682138132438,636.1488357976593,667.6478279396249,660.8659426123893,718.1733077875534,10
|
13 |
+
11,589.5182163368322,618.322599530766,716.24091343748,650.5309762552923,613.0528500856026,607.7446749208535,713.39385116429,588.1348913466418,593.8867112332022,649.284259099433,636.8567105969262,668.3597789175591,661.5142347432303,719.0651991721768,11
|
14 |
+
12,584.9838210241215,615.3303238975622,712.3568357655938,648.3677867295952,611.5258642480559,605.1544918967002,711.3297522323834,584.7641911685396,592.0595044309526,646.5338786027611,634.9173361876275,667.0013329361564,656.4698965785147,716.6395087046192,12
|
15 |
+
13,581.5220193508667,612.687737529571,709.2249188959175,647.2204519771175,609.9729586988227,603.4141396215696,709.7467399437463,583.8720383963625,590.0943116032118,644.8813143536664,633.4791594166866,665.7285397205048,652.3835464313739,714.7167386158347,13
|
16 |
+
14,578.773183581451,608.9897442173759,706.0335707075503,645.0859489518062,608.4972325666221,600.5133865534436,707.4700605353008,579.7943918707982,589.310660868885,642.3168704457452,630.9613941686544,664.4086658676039,648.8874898647856,711.4844547667986,14
|
17 |
+
15,577.2696903958636,607.4567549682497,705.045083412137,644.7757030837558,607.8796773405677,599.3406549700887,706.8446979348059,578.6843042444436,588.7597144196682,641.635309066003,629.251153792108,663.8157777881115,646.2890008235288,709.8728908477798,15
|
18 |
+
16,575.664967537361,605.3268825842044,702.6655681486056,643.9843243091183,606.5870193320288,597.0590140880041,705.1798481251435,578.077331410402,588.2782627829613,640.7516781347916,627.6176111005921,663.1656074817056,644.0287351527754,708.1775700455779,16
|
19 |
+
17,574.0591198996926,604.0177656683932,700.6290648076781,642.688511914822,605.7629105668955,595.48146235614,704.1845012748911,575.6680845466807,587.632420409432,639.2240420911392,626.51436028497,662.169688713374,642.3709589508904,706.5637306660359,17
|
20 |
+
18,572.2630118446893,603.0693974069595,699.140769510253,641.5601613010398,605.1070245064401,594.7047958131006,702.6697533863651,574.0915918266344,586.8975741426962,638.3806205698611,626.0368856083089,661.6694028225465,639.7042418828519,706.0886798120923,18
|
21 |
+
19,570.780511823943,601.9249360658484,697.7591876571412,640.254313651557,604.0687566973556,593.1513642279393,701.1905626546211,572.0192029136342,587.0589607140283,637.7367351395895,625.1543805560473,661.0715302527323,637.7178115754689,705.1099707979018,19
|
22 |
+
20,571.5127623394145,602.2066149210393,698.177554507262,640.9174857257098,604.3994471059788,593.7178701283473,701.8342946981738,573.1926771402124,586.7743749845421,638.0151495705611,625.742447962035,661.4630435175633,638.2634707279194,705.4841185226455,20
|
23 |
+
21,570.5852499511337,600.8043869448671,697.3334805095099,640.9128051119659,604.1749307281642,592.7136779254823,700.8511387823481,572.2458733972068,586.8268888699081,637.4616722160297,625.5606377537314,661.1835278633856,636.8972195601174,704.6122560924734,21
|
24 |
+
22,569.7806208324092,599.90113742883,696.1551128032131,640.3206821468891,603.2714080052851,592.2593133905908,700.2874612862214,571.8350377442333,585.3989890912651,636.9061107230797,624.7618150636553,660.7893916430663,635.1917343113911,703.4895087171692,22
|
25 |
+
23,568.7909755928669,599.5769911658084,695.31909078836,639.9638595086408,602.9701163283648,591.9984110163101,699.5755363242596,571.3809261055638,585.2410231839682,636.6429799519332,624.5148310562275,660.582051674323,633.9516866664687,703.060368612541,23
|
26 |
+
24,567.6804267728196,598.9319716799558,694.2434277968888,639.4015832667063,602.2803937519755,590.6382148608167,698.8578639199657,569.976556868412,585.2237920012386,636.1369521682705,623.6928543633396,660.4643664996307,632.680233576771,702.160759855424,24
|
27 |
+
25,566.3629961317681,598.4189891845375,693.3506617174979,639.025092447775,601.7839153317499,589.9435432819197,698.2100681697757,568.4089796785605,585.331743690273,635.6607969966682,623.050887521307,659.9122947686835,631.127273208597,701.4927116991628,25
|
28 |
+
26,565.5527632859471,598.4429809352572,692.8788501870138,638.5435200617649,601.3685018755712,588.8884558720987,697.7384744685396,568.5339824835058,585.1429992363101,635.492594732926,622.4663870002253,659.8317848436752,630.0598024898521,701.0862636603699,26
|
29 |
+
27,565.8397601754149,598.6968101121863,693.4354138772941,638.7817836988613,601.7114918787605,589.4658715537857,698.02945629981,569.262623788053,584.9416380884509,635.9056737222279,622.8207534306896,659.9385297722687,630.6975487220275,701.5495998951778,27
|
30 |
+
28,565.7125477276957,598.3086206438642,692.6343643636384,638.8238784829543,601.7836507626503,589.1290141943938,697.3550263964914,569.6007422490479,584.9418243820081,636.1807172585213,622.2669848468437,659.6076880451526,629.8539466458425,700.959252952045,28
|
31 |
+
29,565.3190631380744,598.2314982451803,691.7557767562414,639.0061571292919,601.5335736664177,588.774945489402,696.2776575888688,569.2962429577211,584.5950407561058,635.876114219732,621.9934382631757,659.4105459004777,628.7541217439046,700.2611060857353,29
|
32 |
+
30,565.6607404962194,598.2078596172695,691.6410094235471,638.8057240492251,601.5040286971572,589.251040227096,696.5195437506239,569.5111426248332,584.674265011558,635.8254801920561,622.2356251789718,659.3198963600023,629.262750587241,700.4952454542739,30
|
33 |
+
31,564.8352672658827,597.0438113858539,691.0833363745967,638.5162433282142,601.4076171335715,589.2415684021477,696.1649428429013,569.33532595307,585.1710120427615,635.5219407322602,621.9623219043755,659.1733542201614,628.7776204852973,700.2555239382336,31
|
34 |
+
32,564.0038235848505,595.5834313312713,690.1674443634612,638.5932163281392,601.2296994115135,588.9645804376365,695.6881218774157,569.9177896704355,585.3951505114562,634.8565388862999,621.5750564610103,658.9430354766166,627.9720794623624,700.003036322642,32
|
35 |
+
33,564.1186023243777,595.0613450878775,689.5778444314027,638.575201742338,600.955672683097,588.4558147207764,695.2182627139741,569.7066883122773,585.3831374510894,634.2217876174765,621.2938041134965,658.8866896876679,627.2813283021916,699.9300062068482,33
|
36 |
+
34,564.4271932300455,595.4123065741094,690.0009873653669,638.5395460754002,601.1574847956921,588.8456443833736,695.4868017534175,569.8773521062257,585.203464159462,634.2892112815317,621.5125404535727,658.9474837616003,627.7048362642913,700.116184273579,34
|
37 |
+
35,565.1593146419949,596.4280853428336,690.8691224089195,638.6927156788012,601.789199874673,589.4026992564604,696.0588573359586,570.3160057175952,585.4584624655465,634.7719918673711,621.9995476652037,659.2848590853157,628.871692374401,700.7662095248967,35
|
38 |
+
36,565.287716135833,596.3308402460937,690.285698621844,638.441001852567,601.6010914740499,588.6132686431056,695.6184784934085,568.9838410869844,585.3101886566062,634.5754237861742,621.9302525772285,659.0008828880373,628.4542410695352,700.5373798012636,36
|
39 |
+
37,564.9020004757136,596.7951775484757,689.7642741663126,638.1490016713188,601.5183423012853,589.0807475133544,694.9370008406274,568.1487237914284,585.4731081178237,634.1572564512918,621.5511189718871,658.5122502226754,628.1867011388488,700.4848173309434,37
|
40 |
+
38,564.3730946403289,596.380842209301,689.6779632429117,638.673915659707,601.4216822373772,588.7591993987488,694.9385575981698,568.4993097766853,585.4846341287998,633.8621411462135,620.9935155072978,658.3784424586584,627.6251786254774,700.3609774992724,38
|
41 |
+
39,564.574170070073,596.6677276635442,689.6999093078748,638.5724902737153,601.3295513248406,589.1362769648549,695.3030915046879,568.8856420645013,585.3970713823205,633.773920197131,621.0697922396822,658.4158001586013,627.6801250268218,700.5151817938748,39
|
data/faction-picker-bot/models/alchemists_model.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
data/faction-picker-bot/models/auren_model.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
data/faction-picker-bot/models/chaosmagicians_model.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
data/faction-picker-bot/models/cultists_model.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
data/faction-picker-bot/models/darklings_model.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
data/faction-picker-bot/models/dwarves_model.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
data/faction-picker-bot/models/engineers_model.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
data/faction-picker-bot/models/fakirs_model.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
data/faction-picker-bot/models/giants_model.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
data/faction-picker-bot/models/halflings_model.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
data/faction-picker-bot/models/mermaids_model.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
data/faction-picker-bot/models/nomads_model.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
data/faction-picker-bot/models/swarmlings_model.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
data/faction-picker-bot/models/witches_model.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
faction-picker-bot/.ipynb_checkpoints/creatingVPdata-checkpoint.ipynb
ADDED
The diff for this file is too large to render.
See raw diff
|
|
faction-picker-bot/.ipynb_checkpoints/creatingVPdata-diffeats-checkpoint.ipynb
ADDED
The diff for this file is too large to render.
See raw diff
|
|
faction-picker-bot/.ipynb_checkpoints/individual_faction_data-checkpoint.ipynb
ADDED
@@ -0,0 +1,1087 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cells": [
|
3 |
+
{
|
4 |
+
"cell_type": "code",
|
5 |
+
"execution_count": 73,
|
6 |
+
"id": "2f27067c-4b22-4f2e-b467-427467475fa6",
|
7 |
+
"metadata": {},
|
8 |
+
"outputs": [],
|
9 |
+
"source": [
|
10 |
+
"import pandas as pd\n",
|
11 |
+
"import numpy as np\n",
|
12 |
+
"import math\n",
|
13 |
+
"import time\n",
|
14 |
+
"import yaml\n",
|
15 |
+
"import os"
|
16 |
+
]
|
17 |
+
},
|
18 |
+
{
|
19 |
+
"cell_type": "code",
|
20 |
+
"execution_count": 83,
|
21 |
+
"id": "df1442eb-fb81-43c5-9b22-2cff7b794da0",
|
22 |
+
"metadata": {},
|
23 |
+
"outputs": [
|
24 |
+
{
|
25 |
+
"data": {
|
26 |
+
"text/plain": [
|
27 |
+
"'D:\\\\PycharmProjects\\\\TerraBot\\\\faction-picker-bot'"
|
28 |
+
]
|
29 |
+
},
|
30 |
+
"execution_count": 83,
|
31 |
+
"metadata": {},
|
32 |
+
"output_type": "execute_result"
|
33 |
+
}
|
34 |
+
],
|
35 |
+
"source": [
|
36 |
+
"_dh[0]"
|
37 |
+
]
|
38 |
+
},
|
39 |
+
{
|
40 |
+
"cell_type": "code",
|
41 |
+
"execution_count": 76,
|
42 |
+
"id": "708c5ce7-eed3-4449-9140-1f41e8865b66",
|
43 |
+
"metadata": {},
|
44 |
+
"outputs": [
|
45 |
+
{
|
46 |
+
"data": {
|
47 |
+
"text/plain": [
|
48 |
+
"['In',\n",
|
49 |
+
" 'Out',\n",
|
50 |
+
" '_',\n",
|
51 |
+
" '_11',\n",
|
52 |
+
" '_12',\n",
|
53 |
+
" '_14',\n",
|
54 |
+
" '_15',\n",
|
55 |
+
" '_17',\n",
|
56 |
+
" '_19',\n",
|
57 |
+
" '_2',\n",
|
58 |
+
" '_20',\n",
|
59 |
+
" '_21',\n",
|
60 |
+
" '_33',\n",
|
61 |
+
" '_34',\n",
|
62 |
+
" '_35',\n",
|
63 |
+
" '_36',\n",
|
64 |
+
" '_37',\n",
|
65 |
+
" '_38',\n",
|
66 |
+
" '_39',\n",
|
67 |
+
" '_40',\n",
|
68 |
+
" '_42',\n",
|
69 |
+
" '_43',\n",
|
70 |
+
" '_44',\n",
|
71 |
+
" '_45',\n",
|
72 |
+
" '_46',\n",
|
73 |
+
" '_47',\n",
|
74 |
+
" '_48',\n",
|
75 |
+
" '_49',\n",
|
76 |
+
" '_50',\n",
|
77 |
+
" '_51',\n",
|
78 |
+
" '_52',\n",
|
79 |
+
" '_53',\n",
|
80 |
+
" '_54',\n",
|
81 |
+
" '_55',\n",
|
82 |
+
" '_56',\n",
|
83 |
+
" '_57',\n",
|
84 |
+
" '_58',\n",
|
85 |
+
" '_59',\n",
|
86 |
+
" '_6',\n",
|
87 |
+
" '_63',\n",
|
88 |
+
" '_64',\n",
|
89 |
+
" '_8',\n",
|
90 |
+
" '_9',\n",
|
91 |
+
" '__',\n",
|
92 |
+
" '___',\n",
|
93 |
+
" '__builtin__',\n",
|
94 |
+
" '__builtins__',\n",
|
95 |
+
" '__doc__',\n",
|
96 |
+
" '__loader__',\n",
|
97 |
+
" '__name__',\n",
|
98 |
+
" '__package__',\n",
|
99 |
+
" '__spec__',\n",
|
100 |
+
" '_dh',\n",
|
101 |
+
" '_i',\n",
|
102 |
+
" '_i1',\n",
|
103 |
+
" '_i10',\n",
|
104 |
+
" '_i11',\n",
|
105 |
+
" '_i12',\n",
|
106 |
+
" '_i13',\n",
|
107 |
+
" '_i14',\n",
|
108 |
+
" '_i15',\n",
|
109 |
+
" '_i16',\n",
|
110 |
+
" '_i17',\n",
|
111 |
+
" '_i18',\n",
|
112 |
+
" '_i19',\n",
|
113 |
+
" '_i2',\n",
|
114 |
+
" '_i20',\n",
|
115 |
+
" '_i21',\n",
|
116 |
+
" '_i22',\n",
|
117 |
+
" '_i23',\n",
|
118 |
+
" '_i24',\n",
|
119 |
+
" '_i25',\n",
|
120 |
+
" '_i26',\n",
|
121 |
+
" '_i27',\n",
|
122 |
+
" '_i28',\n",
|
123 |
+
" '_i29',\n",
|
124 |
+
" '_i3',\n",
|
125 |
+
" '_i30',\n",
|
126 |
+
" '_i31',\n",
|
127 |
+
" '_i32',\n",
|
128 |
+
" '_i33',\n",
|
129 |
+
" '_i34',\n",
|
130 |
+
" '_i35',\n",
|
131 |
+
" '_i36',\n",
|
132 |
+
" '_i37',\n",
|
133 |
+
" '_i38',\n",
|
134 |
+
" '_i39',\n",
|
135 |
+
" '_i4',\n",
|
136 |
+
" '_i40',\n",
|
137 |
+
" '_i41',\n",
|
138 |
+
" '_i42',\n",
|
139 |
+
" '_i43',\n",
|
140 |
+
" '_i44',\n",
|
141 |
+
" '_i45',\n",
|
142 |
+
" '_i46',\n",
|
143 |
+
" '_i47',\n",
|
144 |
+
" '_i48',\n",
|
145 |
+
" '_i49',\n",
|
146 |
+
" '_i5',\n",
|
147 |
+
" '_i50',\n",
|
148 |
+
" '_i51',\n",
|
149 |
+
" '_i52',\n",
|
150 |
+
" '_i53',\n",
|
151 |
+
" '_i54',\n",
|
152 |
+
" '_i55',\n",
|
153 |
+
" '_i56',\n",
|
154 |
+
" '_i57',\n",
|
155 |
+
" '_i58',\n",
|
156 |
+
" '_i59',\n",
|
157 |
+
" '_i6',\n",
|
158 |
+
" '_i60',\n",
|
159 |
+
" '_i61',\n",
|
160 |
+
" '_i62',\n",
|
161 |
+
" '_i63',\n",
|
162 |
+
" '_i64',\n",
|
163 |
+
" '_i65',\n",
|
164 |
+
" '_i66',\n",
|
165 |
+
" '_i67',\n",
|
166 |
+
" '_i68',\n",
|
167 |
+
" '_i69',\n",
|
168 |
+
" '_i7',\n",
|
169 |
+
" '_i70',\n",
|
170 |
+
" '_i71',\n",
|
171 |
+
" '_i72',\n",
|
172 |
+
" '_i73',\n",
|
173 |
+
" '_i74',\n",
|
174 |
+
" '_i75',\n",
|
175 |
+
" '_i76',\n",
|
176 |
+
" '_i8',\n",
|
177 |
+
" '_i9',\n",
|
178 |
+
" '_ih',\n",
|
179 |
+
" '_ii',\n",
|
180 |
+
" '_iii',\n",
|
181 |
+
" '_oh',\n",
|
182 |
+
" 'allmermaids',\n",
|
183 |
+
" 'colnames',\n",
|
184 |
+
" 'each_faction_dataset',\n",
|
185 |
+
" 'exit',\n",
|
186 |
+
" 'faction',\n",
|
187 |
+
" 'faction_dataset',\n",
|
188 |
+
" 'factions',\n",
|
189 |
+
" 'featdf',\n",
|
190 |
+
" 'get_ipython',\n",
|
191 |
+
" 'indexes',\n",
|
192 |
+
" 'indexs',\n",
|
193 |
+
" 'math',\n",
|
194 |
+
" 'np',\n",
|
195 |
+
" 'os',\n",
|
196 |
+
" 'pd',\n",
|
197 |
+
" 'quit',\n",
|
198 |
+
" 'time',\n",
|
199 |
+
" 'vpdf',\n",
|
200 |
+
" 'yaml']"
|
201 |
+
]
|
202 |
+
},
|
203 |
+
"execution_count": 76,
|
204 |
+
"metadata": {},
|
205 |
+
"output_type": "execute_result"
|
206 |
+
}
|
207 |
+
],
|
208 |
+
"source": [
|
209 |
+
"dir()"
|
210 |
+
]
|
211 |
+
},
|
212 |
+
{
|
213 |
+
"cell_type": "code",
|
214 |
+
"execution_count": 90,
|
215 |
+
"id": "b51ade6d-f3df-4c59-95bb-f1e1df99cf75",
|
216 |
+
"metadata": {},
|
217 |
+
"outputs": [],
|
218 |
+
"source": [
|
219 |
+
"script_dir = os.path.dirname(_dh[0])\n",
|
220 |
+
"filename = os.path.join(script_dir, 'params.yaml')"
|
221 |
+
]
|
222 |
+
},
|
223 |
+
{
|
224 |
+
"cell_type": "code",
|
225 |
+
"execution_count": 91,
|
226 |
+
"id": "7fdcd13e-011c-4349-86b1-f00098edc00c",
|
227 |
+
"metadata": {},
|
228 |
+
"outputs": [
|
229 |
+
{
|
230 |
+
"data": {
|
231 |
+
"text/plain": [
|
232 |
+
"'D:\\\\PycharmProjects\\\\TerraBot\\\\params.yaml'"
|
233 |
+
]
|
234 |
+
},
|
235 |
+
"execution_count": 91,
|
236 |
+
"metadata": {},
|
237 |
+
"output_type": "execute_result"
|
238 |
+
}
|
239 |
+
],
|
240 |
+
"source": [
|
241 |
+
"filename"
|
242 |
+
]
|
243 |
+
},
|
244 |
+
{
|
245 |
+
"cell_type": "code",
|
246 |
+
"execution_count": 2,
|
247 |
+
"id": "abc42db1-fdda-48f9-ac22-73ab04e07658",
|
248 |
+
"metadata": {},
|
249 |
+
"outputs": [
|
250 |
+
{
|
251 |
+
"ename": "NameError",
|
252 |
+
"evalue": "name 'yaml' is not defined",
|
253 |
+
"output_type": "error",
|
254 |
+
"traceback": [
|
255 |
+
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
|
256 |
+
"\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)",
|
257 |
+
"\u001b[1;32m<ipython-input-2-6d8b02a8dfed>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[0;32m 1\u001b[0m \u001b[1;32mwith\u001b[0m \u001b[0mopen\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"../params.yaml\"\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;34m'r'\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;32mas\u001b[0m \u001b[0mfd\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 2\u001b[1;33m \u001b[0mparams\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0myaml\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0msafe_load\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mfd\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
|
258 |
+
"\u001b[1;31mNameError\u001b[0m: name 'yaml' is not defined"
|
259 |
+
]
|
260 |
+
}
|
261 |
+
],
|
262 |
+
"source": [
|
263 |
+
"with open(\"../params.yaml\", 'r') as fd:\n",
|
264 |
+
" params = yaml.safe_load(fd)"
|
265 |
+
]
|
266 |
+
},
|
267 |
+
{
|
268 |
+
"cell_type": "code",
|
269 |
+
"execution_count": 2,
|
270 |
+
"id": "941150cc-5223-4984-8981-808021c5ce55",
|
271 |
+
"metadata": {},
|
272 |
+
"outputs": [
|
273 |
+
{
|
274 |
+
"data": {
|
275 |
+
"text/html": [
|
276 |
+
"<div>\n",
|
277 |
+
"<style scoped>\n",
|
278 |
+
" .dataframe tbody tr th:only-of-type {\n",
|
279 |
+
" vertical-align: middle;\n",
|
280 |
+
" }\n",
|
281 |
+
"\n",
|
282 |
+
" .dataframe tbody tr th {\n",
|
283 |
+
" vertical-align: top;\n",
|
284 |
+
" }\n",
|
285 |
+
"\n",
|
286 |
+
" .dataframe thead th {\n",
|
287 |
+
" text-align: right;\n",
|
288 |
+
" }\n",
|
289 |
+
"</style>\n",
|
290 |
+
"<table border=\"1\" class=\"dataframe\">\n",
|
291 |
+
" <thead>\n",
|
292 |
+
" <tr style=\"text-align: right;\">\n",
|
293 |
+
" <th></th>\n",
|
294 |
+
" <th>Unnamed: 0</th>\n",
|
295 |
+
" <th>game</th>\n",
|
296 |
+
" <th>witches</th>\n",
|
297 |
+
" <th>auren</th>\n",
|
298 |
+
" <th>swarmlings</th>\n",
|
299 |
+
" <th>mermaids</th>\n",
|
300 |
+
" <th>cultists</th>\n",
|
301 |
+
" <th>halflings</th>\n",
|
302 |
+
" <th>dwarves</th>\n",
|
303 |
+
" <th>engineers</th>\n",
|
304 |
+
" <th>chaosmagicians</th>\n",
|
305 |
+
" <th>giants</th>\n",
|
306 |
+
" <th>fakirs</th>\n",
|
307 |
+
" <th>nomads</th>\n",
|
308 |
+
" <th>darklings</th>\n",
|
309 |
+
" <th>alchemists</th>\n",
|
310 |
+
" </tr>\n",
|
311 |
+
" </thead>\n",
|
312 |
+
" <tbody>\n",
|
313 |
+
" <tr>\n",
|
314 |
+
" <th>0</th>\n",
|
315 |
+
" <td>0</td>\n",
|
316 |
+
" <td>0000000001</td>\n",
|
317 |
+
" <td>NaN</td>\n",
|
318 |
+
" <td>NaN</td>\n",
|
319 |
+
" <td>NaN</td>\n",
|
320 |
+
" <td>118.0</td>\n",
|
321 |
+
" <td>NaN</td>\n",
|
322 |
+
" <td>62.0</td>\n",
|
323 |
+
" <td>NaN</td>\n",
|
324 |
+
" <td>NaN</td>\n",
|
325 |
+
" <td>NaN</td>\n",
|
326 |
+
" <td>NaN</td>\n",
|
327 |
+
" <td>NaN</td>\n",
|
328 |
+
" <td>NaN</td>\n",
|
329 |
+
" <td>NaN</td>\n",
|
330 |
+
" <td>NaN</td>\n",
|
331 |
+
" </tr>\n",
|
332 |
+
" <tr>\n",
|
333 |
+
" <th>1</th>\n",
|
334 |
+
" <td>1</td>\n",
|
335 |
+
" <td>050615</td>\n",
|
336 |
+
" <td>NaN</td>\n",
|
337 |
+
" <td>NaN</td>\n",
|
338 |
+
" <td>NaN</td>\n",
|
339 |
+
" <td>NaN</td>\n",
|
340 |
+
" <td>NaN</td>\n",
|
341 |
+
" <td>NaN</td>\n",
|
342 |
+
" <td>NaN</td>\n",
|
343 |
+
" <td>NaN</td>\n",
|
344 |
+
" <td>NaN</td>\n",
|
345 |
+
" <td>NaN</td>\n",
|
346 |
+
" <td>NaN</td>\n",
|
347 |
+
" <td>NaN</td>\n",
|
348 |
+
" <td>122.0</td>\n",
|
349 |
+
" <td>NaN</td>\n",
|
350 |
+
" </tr>\n",
|
351 |
+
" <tr>\n",
|
352 |
+
" <th>2</th>\n",
|
353 |
+
" <td>2</td>\n",
|
354 |
+
" <td>0512</td>\n",
|
355 |
+
" <td>NaN</td>\n",
|
356 |
+
" <td>NaN</td>\n",
|
357 |
+
" <td>NaN</td>\n",
|
358 |
+
" <td>NaN</td>\n",
|
359 |
+
" <td>NaN</td>\n",
|
360 |
+
" <td>NaN</td>\n",
|
361 |
+
" <td>NaN</td>\n",
|
362 |
+
" <td>124.0</td>\n",
|
363 |
+
" <td>101.0</td>\n",
|
364 |
+
" <td>NaN</td>\n",
|
365 |
+
" <td>NaN</td>\n",
|
366 |
+
" <td>NaN</td>\n",
|
367 |
+
" <td>NaN</td>\n",
|
368 |
+
" <td>NaN</td>\n",
|
369 |
+
" </tr>\n",
|
370 |
+
" <tr>\n",
|
371 |
+
" <th>3</th>\n",
|
372 |
+
" <td>3</td>\n",
|
373 |
+
" <td>051501</td>\n",
|
374 |
+
" <td>NaN</td>\n",
|
375 |
+
" <td>84.0</td>\n",
|
376 |
+
" <td>NaN</td>\n",
|
377 |
+
" <td>NaN</td>\n",
|
378 |
+
" <td>NaN</td>\n",
|
379 |
+
" <td>77.0</td>\n",
|
380 |
+
" <td>NaN</td>\n",
|
381 |
+
" <td>NaN</td>\n",
|
382 |
+
" <td>72.0</td>\n",
|
383 |
+
" <td>NaN</td>\n",
|
384 |
+
" <td>NaN</td>\n",
|
385 |
+
" <td>54.0</td>\n",
|
386 |
+
" <td>78.0</td>\n",
|
387 |
+
" <td>NaN</td>\n",
|
388 |
+
" </tr>\n",
|
389 |
+
" <tr>\n",
|
390 |
+
" <th>4</th>\n",
|
391 |
+
" <td>4</td>\n",
|
392 |
+
" <td>060303</td>\n",
|
393 |
+
" <td>NaN</td>\n",
|
394 |
+
" <td>NaN</td>\n",
|
395 |
+
" <td>NaN</td>\n",
|
396 |
+
" <td>108.0</td>\n",
|
397 |
+
" <td>NaN</td>\n",
|
398 |
+
" <td>NaN</td>\n",
|
399 |
+
" <td>NaN</td>\n",
|
400 |
+
" <td>121.0</td>\n",
|
401 |
+
" <td>NaN</td>\n",
|
402 |
+
" <td>NaN</td>\n",
|
403 |
+
" <td>78.0</td>\n",
|
404 |
+
" <td>NaN</td>\n",
|
405 |
+
" <td>128.0</td>\n",
|
406 |
+
" <td>NaN</td>\n",
|
407 |
+
" </tr>\n",
|
408 |
+
" <tr>\n",
|
409 |
+
" <th>...</th>\n",
|
410 |
+
" <td>...</td>\n",
|
411 |
+
" <td>...</td>\n",
|
412 |
+
" <td>...</td>\n",
|
413 |
+
" <td>...</td>\n",
|
414 |
+
" <td>...</td>\n",
|
415 |
+
" <td>...</td>\n",
|
416 |
+
" <td>...</td>\n",
|
417 |
+
" <td>...</td>\n",
|
418 |
+
" <td>...</td>\n",
|
419 |
+
" <td>...</td>\n",
|
420 |
+
" <td>...</td>\n",
|
421 |
+
" <td>...</td>\n",
|
422 |
+
" <td>...</td>\n",
|
423 |
+
" <td>...</td>\n",
|
424 |
+
" <td>...</td>\n",
|
425 |
+
" <td>...</td>\n",
|
426 |
+
" </tr>\n",
|
427 |
+
" <tr>\n",
|
428 |
+
" <th>111541</th>\n",
|
429 |
+
" <td>111541</td>\n",
|
430 |
+
" <td>Youreacrookcaptianhook</td>\n",
|
431 |
+
" <td>NaN</td>\n",
|
432 |
+
" <td>NaN</td>\n",
|
433 |
+
" <td>126.0</td>\n",
|
434 |
+
" <td>NaN</td>\n",
|
435 |
+
" <td>NaN</td>\n",
|
436 |
+
" <td>105.0</td>\n",
|
437 |
+
" <td>NaN</td>\n",
|
438 |
+
" <td>NaN</td>\n",
|
439 |
+
" <td>NaN</td>\n",
|
440 |
+
" <td>NaN</td>\n",
|
441 |
+
" <td>NaN</td>\n",
|
442 |
+
" <td>37.0</td>\n",
|
443 |
+
" <td>NaN</td>\n",
|
444 |
+
" <td>NaN</td>\n",
|
445 |
+
" </tr>\n",
|
446 |
+
" <tr>\n",
|
447 |
+
" <th>111542</th>\n",
|
448 |
+
" <td>111542</td>\n",
|
449 |
+
" <td>YourMomIsAChaosMagician</td>\n",
|
450 |
+
" <td>112.0</td>\n",
|
451 |
+
" <td>NaN</td>\n",
|
452 |
+
" <td>114.0</td>\n",
|
453 |
+
" <td>NaN</td>\n",
|
454 |
+
" <td>NaN</td>\n",
|
455 |
+
" <td>NaN</td>\n",
|
456 |
+
" <td>NaN</td>\n",
|
457 |
+
" <td>NaN</td>\n",
|
458 |
+
" <td>NaN</td>\n",
|
459 |
+
" <td>NaN</td>\n",
|
460 |
+
" <td>NaN</td>\n",
|
461 |
+
" <td>120.0</td>\n",
|
462 |
+
" <td>NaN</td>\n",
|
463 |
+
" <td>NaN</td>\n",
|
464 |
+
" </tr>\n",
|
465 |
+
" <tr>\n",
|
466 |
+
" <th>111543</th>\n",
|
467 |
+
" <td>111543</td>\n",
|
468 |
+
" <td>ytuwertqwtr</td>\n",
|
469 |
+
" <td>NaN</td>\n",
|
470 |
+
" <td>NaN</td>\n",
|
471 |
+
" <td>105.0</td>\n",
|
472 |
+
" <td>NaN</td>\n",
|
473 |
+
" <td>NaN</td>\n",
|
474 |
+
" <td>NaN</td>\n",
|
475 |
+
" <td>102.0</td>\n",
|
476 |
+
" <td>NaN</td>\n",
|
477 |
+
" <td>NaN</td>\n",
|
478 |
+
" <td>NaN</td>\n",
|
479 |
+
" <td>NaN</td>\n",
|
480 |
+
" <td>NaN</td>\n",
|
481 |
+
" <td>NaN</td>\n",
|
482 |
+
" <td>NaN</td>\n",
|
483 |
+
" </tr>\n",
|
484 |
+
" <tr>\n",
|
485 |
+
" <th>111544</th>\n",
|
486 |
+
" <td>111544</td>\n",
|
487 |
+
" <td>yuertyqert</td>\n",
|
488 |
+
" <td>128.0</td>\n",
|
489 |
+
" <td>NaN</td>\n",
|
490 |
+
" <td>NaN</td>\n",
|
491 |
+
" <td>NaN</td>\n",
|
492 |
+
" <td>NaN</td>\n",
|
493 |
+
" <td>NaN</td>\n",
|
494 |
+
" <td>NaN</td>\n",
|
495 |
+
" <td>NaN</td>\n",
|
496 |
+
" <td>141.0</td>\n",
|
497 |
+
" <td>NaN</td>\n",
|
498 |
+
" <td>NaN</td>\n",
|
499 |
+
" <td>NaN</td>\n",
|
500 |
+
" <td>NaN</td>\n",
|
501 |
+
" <td>NaN</td>\n",
|
502 |
+
" </tr>\n",
|
503 |
+
" <tr>\n",
|
504 |
+
" <th>111545</th>\n",
|
505 |
+
" <td>111545</td>\n",
|
506 |
+
" <td>ZeicheMasZeuchnis</td>\n",
|
507 |
+
" <td>NaN</td>\n",
|
508 |
+
" <td>NaN</td>\n",
|
509 |
+
" <td>NaN</td>\n",
|
510 |
+
" <td>NaN</td>\n",
|
511 |
+
" <td>NaN</td>\n",
|
512 |
+
" <td>NaN</td>\n",
|
513 |
+
" <td>132.0</td>\n",
|
514 |
+
" <td>NaN</td>\n",
|
515 |
+
" <td>NaN</td>\n",
|
516 |
+
" <td>NaN</td>\n",
|
517 |
+
" <td>NaN</td>\n",
|
518 |
+
" <td>88.0</td>\n",
|
519 |
+
" <td>120.0</td>\n",
|
520 |
+
" <td>NaN</td>\n",
|
521 |
+
" </tr>\n",
|
522 |
+
" </tbody>\n",
|
523 |
+
"</table>\n",
|
524 |
+
"<p>111546 rows × 16 columns</p>\n",
|
525 |
+
"</div>"
|
526 |
+
],
|
527 |
+
"text/plain": [
|
528 |
+
" Unnamed: 0 game witches auren swarmlings \\\n",
|
529 |
+
"0 0 0000000001 NaN NaN NaN \n",
|
530 |
+
"1 1 050615 NaN NaN NaN \n",
|
531 |
+
"2 2 0512 NaN NaN NaN \n",
|
532 |
+
"3 3 051501 NaN 84.0 NaN \n",
|
533 |
+
"4 4 060303 NaN NaN NaN \n",
|
534 |
+
"... ... ... ... ... ... \n",
|
535 |
+
"111541 111541 Youreacrookcaptianhook NaN NaN 126.0 \n",
|
536 |
+
"111542 111542 YourMomIsAChaosMagician 112.0 NaN 114.0 \n",
|
537 |
+
"111543 111543 ytuwertqwtr NaN NaN 105.0 \n",
|
538 |
+
"111544 111544 yuertyqert 128.0 NaN NaN \n",
|
539 |
+
"111545 111545 ZeicheMasZeuchnis NaN NaN NaN \n",
|
540 |
+
"\n",
|
541 |
+
" mermaids cultists halflings dwarves engineers chaosmagicians \\\n",
|
542 |
+
"0 118.0 NaN 62.0 NaN NaN NaN \n",
|
543 |
+
"1 NaN NaN NaN NaN NaN NaN \n",
|
544 |
+
"2 NaN NaN NaN NaN 124.0 101.0 \n",
|
545 |
+
"3 NaN NaN 77.0 NaN NaN 72.0 \n",
|
546 |
+
"4 108.0 NaN NaN NaN 121.0 NaN \n",
|
547 |
+
"... ... ... ... ... ... ... \n",
|
548 |
+
"111541 NaN NaN 105.0 NaN NaN NaN \n",
|
549 |
+
"111542 NaN NaN NaN NaN NaN NaN \n",
|
550 |
+
"111543 NaN NaN NaN 102.0 NaN NaN \n",
|
551 |
+
"111544 NaN NaN NaN NaN NaN 141.0 \n",
|
552 |
+
"111545 NaN NaN NaN 132.0 NaN NaN \n",
|
553 |
+
"\n",
|
554 |
+
" giants fakirs nomads darklings alchemists \n",
|
555 |
+
"0 NaN NaN NaN NaN NaN \n",
|
556 |
+
"1 NaN NaN NaN 122.0 NaN \n",
|
557 |
+
"2 NaN NaN NaN NaN NaN \n",
|
558 |
+
"3 NaN NaN 54.0 78.0 NaN \n",
|
559 |
+
"4 NaN 78.0 NaN 128.0 NaN \n",
|
560 |
+
"... ... ... ... ... ... \n",
|
561 |
+
"111541 NaN NaN 37.0 NaN NaN \n",
|
562 |
+
"111542 NaN NaN 120.0 NaN NaN \n",
|
563 |
+
"111543 NaN NaN NaN NaN NaN \n",
|
564 |
+
"111544 NaN NaN NaN NaN NaN \n",
|
565 |
+
"111545 NaN NaN 88.0 120.0 NaN \n",
|
566 |
+
"\n",
|
567 |
+
"[111546 rows x 16 columns]"
|
568 |
+
]
|
569 |
+
},
|
570 |
+
"execution_count": 2,
|
571 |
+
"metadata": {},
|
572 |
+
"output_type": "execute_result"
|
573 |
+
}
|
574 |
+
],
|
575 |
+
"source": [
|
576 |
+
"vpdf = pd.read_csv('D://PycharmProjects/TerraBot/data/faction-picker-bot/vpdata.csv')\n",
|
577 |
+
"featdf = pd.read_csv('D://PycharmProjects/TerraBot/data/faction-picker-bot/featdata.csv')\n",
|
578 |
+
"\n",
|
579 |
+
"# split in 12 faction data\n",
|
580 |
+
"vpdf"
|
581 |
+
]
|
582 |
+
},
|
583 |
+
{
|
584 |
+
"cell_type": "code",
|
585 |
+
"execution_count": 66,
|
586 |
+
"id": "db0b961f-c751-439d-8583-da459db2d6d6",
|
587 |
+
"metadata": {},
|
588 |
+
"outputs": [],
|
589 |
+
"source": [
|
590 |
+
"colnames = list(vpdf.columns)\n",
|
591 |
+
"factions = [x for x in colnames if x != 'game' and x != 'Unnamed: 0']"
|
592 |
+
]
|
593 |
+
},
|
594 |
+
{
|
595 |
+
"cell_type": "code",
|
596 |
+
"execution_count": 15,
|
597 |
+
"id": "657af1ef-3338-4c27-b7a2-dbfe7ab959ed",
|
598 |
+
"metadata": {},
|
599 |
+
"outputs": [
|
600 |
+
{
|
601 |
+
"data": {
|
602 |
+
"text/plain": [
|
603 |
+
"0 False\n",
|
604 |
+
"1 True\n",
|
605 |
+
"2 True\n",
|
606 |
+
"3 True\n",
|
607 |
+
"4 False\n",
|
608 |
+
" ... \n",
|
609 |
+
"111541 True\n",
|
610 |
+
"111542 True\n",
|
611 |
+
"111543 True\n",
|
612 |
+
"111544 True\n",
|
613 |
+
"111545 True\n",
|
614 |
+
"Name: mermaids, Length: 111546, dtype: bool"
|
615 |
+
]
|
616 |
+
},
|
617 |
+
"execution_count": 15,
|
618 |
+
"metadata": {},
|
619 |
+
"output_type": "execute_result"
|
620 |
+
}
|
621 |
+
],
|
622 |
+
"source": [
|
623 |
+
"indexs = pd.isnull(vpdf['mermaids'])"
|
624 |
+
]
|
625 |
+
},
|
626 |
+
{
|
627 |
+
"cell_type": "code",
|
628 |
+
"execution_count": 62,
|
629 |
+
"id": "5ed90fe5-75b1-47db-957d-deeeaf750f02",
|
630 |
+
"metadata": {},
|
631 |
+
"outputs": [],
|
632 |
+
"source": [
|
633 |
+
"allmermaids = vpdf['mermaids'][~indexs]"
|
634 |
+
]
|
635 |
+
},
|
636 |
+
{
|
637 |
+
"cell_type": "code",
|
638 |
+
"execution_count": 63,
|
639 |
+
"id": "788e7f43-8e25-4b53-b4be-98eefee1ae85",
|
640 |
+
"metadata": {},
|
641 |
+
"outputs": [
|
642 |
+
{
|
643 |
+
"data": {
|
644 |
+
"text/plain": [
|
645 |
+
"0 118.0\n",
|
646 |
+
"4 108.0\n",
|
647 |
+
"6 104.0\n",
|
648 |
+
"9 106.0\n",
|
649 |
+
"21 140.0\n",
|
650 |
+
" ... \n",
|
651 |
+
"111522 98.0\n",
|
652 |
+
"111525 90.0\n",
|
653 |
+
"111535 68.0\n",
|
654 |
+
"111537 85.0\n",
|
655 |
+
"111538 136.0\n",
|
656 |
+
"Name: mermaids, Length: 33442, dtype: float64"
|
657 |
+
]
|
658 |
+
},
|
659 |
+
"execution_count": 63,
|
660 |
+
"metadata": {},
|
661 |
+
"output_type": "execute_result"
|
662 |
+
}
|
663 |
+
],
|
664 |
+
"source": [
|
665 |
+
"allmermaids"
|
666 |
+
]
|
667 |
+
},
|
668 |
+
{
|
669 |
+
"cell_type": "code",
|
670 |
+
"execution_count": 64,
|
671 |
+
"id": "282694f1-2c1a-4b55-920a-791d50ea7946",
|
672 |
+
"metadata": {},
|
673 |
+
"outputs": [
|
674 |
+
{
|
675 |
+
"data": {
|
676 |
+
"text/html": [
|
677 |
+
"<div>\n",
|
678 |
+
"<style scoped>\n",
|
679 |
+
" .dataframe tbody tr th:only-of-type {\n",
|
680 |
+
" vertical-align: middle;\n",
|
681 |
+
" }\n",
|
682 |
+
"\n",
|
683 |
+
" .dataframe tbody tr th {\n",
|
684 |
+
" vertical-align: top;\n",
|
685 |
+
" }\n",
|
686 |
+
"\n",
|
687 |
+
" .dataframe thead th {\n",
|
688 |
+
" text-align: right;\n",
|
689 |
+
" }\n",
|
690 |
+
"</style>\n",
|
691 |
+
"<table border=\"1\" class=\"dataframe\">\n",
|
692 |
+
" <thead>\n",
|
693 |
+
" <tr style=\"text-align: right;\">\n",
|
694 |
+
" <th></th>\n",
|
695 |
+
" <th>Unnamed: 0</th>\n",
|
696 |
+
" <th>game</th>\n",
|
697 |
+
" <th>r1_SCORE1</th>\n",
|
698 |
+
" <th>r1_SCORE2</th>\n",
|
699 |
+
" <th>r1_SCORE3</th>\n",
|
700 |
+
" <th>r1_SCORE4</th>\n",
|
701 |
+
" <th>r1_SCORE5</th>\n",
|
702 |
+
" <th>r1_SCORE6</th>\n",
|
703 |
+
" <th>r1_SCORE7</th>\n",
|
704 |
+
" <th>r1_SCORE8</th>\n",
|
705 |
+
" <th>...</th>\n",
|
706 |
+
" <th>BON8</th>\n",
|
707 |
+
" <th>BON9</th>\n",
|
708 |
+
" <th>BON10</th>\n",
|
709 |
+
" <th>2players</th>\n",
|
710 |
+
" <th>3players</th>\n",
|
711 |
+
" <th>4players</th>\n",
|
712 |
+
" <th>5players</th>\n",
|
713 |
+
" <th>map1</th>\n",
|
714 |
+
" <th>map2</th>\n",
|
715 |
+
" <th>map3</th>\n",
|
716 |
+
" </tr>\n",
|
717 |
+
" </thead>\n",
|
718 |
+
" <tbody>\n",
|
719 |
+
" <tr>\n",
|
720 |
+
" <th>0</th>\n",
|
721 |
+
" <td>0</td>\n",
|
722 |
+
" <td>0000000001</td>\n",
|
723 |
+
" <td>0</td>\n",
|
724 |
+
" <td>0</td>\n",
|
725 |
+
" <td>0</td>\n",
|
726 |
+
" <td>0</td>\n",
|
727 |
+
" <td>0</td>\n",
|
728 |
+
" <td>0</td>\n",
|
729 |
+
" <td>0</td>\n",
|
730 |
+
" <td>1</td>\n",
|
731 |
+
" <td>...</td>\n",
|
732 |
+
" <td>0</td>\n",
|
733 |
+
" <td>1</td>\n",
|
734 |
+
" <td>1</td>\n",
|
735 |
+
" <td>1</td>\n",
|
736 |
+
" <td>0</td>\n",
|
737 |
+
" <td>0</td>\n",
|
738 |
+
" <td>0</td>\n",
|
739 |
+
" <td>1</td>\n",
|
740 |
+
" <td>0</td>\n",
|
741 |
+
" <td>0</td>\n",
|
742 |
+
" </tr>\n",
|
743 |
+
" <tr>\n",
|
744 |
+
" <th>4</th>\n",
|
745 |
+
" <td>4</td>\n",
|
746 |
+
" <td>060303</td>\n",
|
747 |
+
" <td>0</td>\n",
|
748 |
+
" <td>1</td>\n",
|
749 |
+
" <td>0</td>\n",
|
750 |
+
" <td>0</td>\n",
|
751 |
+
" <td>0</td>\n",
|
752 |
+
" <td>0</td>\n",
|
753 |
+
" <td>0</td>\n",
|
754 |
+
" <td>0</td>\n",
|
755 |
+
" <td>...</td>\n",
|
756 |
+
" <td>1</td>\n",
|
757 |
+
" <td>1</td>\n",
|
758 |
+
" <td>1</td>\n",
|
759 |
+
" <td>0</td>\n",
|
760 |
+
" <td>0</td>\n",
|
761 |
+
" <td>1</td>\n",
|
762 |
+
" <td>0</td>\n",
|
763 |
+
" <td>0</td>\n",
|
764 |
+
" <td>1</td>\n",
|
765 |
+
" <td>0</td>\n",
|
766 |
+
" </tr>\n",
|
767 |
+
" <tr>\n",
|
768 |
+
" <th>6</th>\n",
|
769 |
+
" <td>6</td>\n",
|
770 |
+
" <td>070315</td>\n",
|
771 |
+
" <td>0</td>\n",
|
772 |
+
" <td>1</td>\n",
|
773 |
+
" <td>0</td>\n",
|
774 |
+
" <td>0</td>\n",
|
775 |
+
" <td>0</td>\n",
|
776 |
+
" <td>0</td>\n",
|
777 |
+
" <td>0</td>\n",
|
778 |
+
" <td>0</td>\n",
|
779 |
+
" <td>...</td>\n",
|
780 |
+
" <td>1</td>\n",
|
781 |
+
" <td>1</td>\n",
|
782 |
+
" <td>1</td>\n",
|
783 |
+
" <td>0</td>\n",
|
784 |
+
" <td>0</td>\n",
|
785 |
+
" <td>1</td>\n",
|
786 |
+
" <td>0</td>\n",
|
787 |
+
" <td>1</td>\n",
|
788 |
+
" <td>0</td>\n",
|
789 |
+
" <td>0</td>\n",
|
790 |
+
" </tr>\n",
|
791 |
+
" <tr>\n",
|
792 |
+
" <th>9</th>\n",
|
793 |
+
" <td>9</td>\n",
|
794 |
+
" <td>0pandoraravenclaw</td>\n",
|
795 |
+
" <td>0</td>\n",
|
796 |
+
" <td>1</td>\n",
|
797 |
+
" <td>0</td>\n",
|
798 |
+
" <td>0</td>\n",
|
799 |
+
" <td>0</td>\n",
|
800 |
+
" <td>0</td>\n",
|
801 |
+
" <td>0</td>\n",
|
802 |
+
" <td>0</td>\n",
|
803 |
+
" <td>...</td>\n",
|
804 |
+
" <td>0</td>\n",
|
805 |
+
" <td>0</td>\n",
|
806 |
+
" <td>0</td>\n",
|
807 |
+
" <td>1</td>\n",
|
808 |
+
" <td>0</td>\n",
|
809 |
+
" <td>0</td>\n",
|
810 |
+
" <td>0</td>\n",
|
811 |
+
" <td>1</td>\n",
|
812 |
+
" <td>0</td>\n",
|
813 |
+
" <td>0</td>\n",
|
814 |
+
" </tr>\n",
|
815 |
+
" <tr>\n",
|
816 |
+
" <th>21</th>\n",
|
817 |
+
" <td>21</td>\n",
|
818 |
+
" <td>16JULY2015</td>\n",
|
819 |
+
" <td>0</td>\n",
|
820 |
+
" <td>0</td>\n",
|
821 |
+
" <td>0</td>\n",
|
822 |
+
" <td>0</td>\n",
|
823 |
+
" <td>1</td>\n",
|
824 |
+
" <td>0</td>\n",
|
825 |
+
" <td>0</td>\n",
|
826 |
+
" <td>0</td>\n",
|
827 |
+
" <td>...</td>\n",
|
828 |
+
" <td>0</td>\n",
|
829 |
+
" <td>1</td>\n",
|
830 |
+
" <td>0</td>\n",
|
831 |
+
" <td>0</td>\n",
|
832 |
+
" <td>0</td>\n",
|
833 |
+
" <td>1</td>\n",
|
834 |
+
" <td>0</td>\n",
|
835 |
+
" <td>1</td>\n",
|
836 |
+
" <td>0</td>\n",
|
837 |
+
" <td>0</td>\n",
|
838 |
+
" </tr>\n",
|
839 |
+
" <tr>\n",
|
840 |
+
" <th>...</th>\n",
|
841 |
+
" <td>...</td>\n",
|
842 |
+
" <td>...</td>\n",
|
843 |
+
" <td>...</td>\n",
|
844 |
+
" <td>...</td>\n",
|
845 |
+
" <td>...</td>\n",
|
846 |
+
" <td>...</td>\n",
|
847 |
+
" <td>...</td>\n",
|
848 |
+
" <td>...</td>\n",
|
849 |
+
" <td>...</td>\n",
|
850 |
+
" <td>...</td>\n",
|
851 |
+
" <td>...</td>\n",
|
852 |
+
" <td>...</td>\n",
|
853 |
+
" <td>...</td>\n",
|
854 |
+
" <td>...</td>\n",
|
855 |
+
" <td>...</td>\n",
|
856 |
+
" <td>...</td>\n",
|
857 |
+
" <td>...</td>\n",
|
858 |
+
" <td>...</td>\n",
|
859 |
+
" <td>...</td>\n",
|
860 |
+
" <td>...</td>\n",
|
861 |
+
" <td>...</td>\n",
|
862 |
+
" </tr>\n",
|
863 |
+
" <tr>\n",
|
864 |
+
" <th>111522</th>\n",
|
865 |
+
" <td>111522</td>\n",
|
866 |
+
" <td>WelcomeFastPlayer</td>\n",
|
867 |
+
" <td>0</td>\n",
|
868 |
+
" <td>0</td>\n",
|
869 |
+
" <td>0</td>\n",
|
870 |
+
" <td>0</td>\n",
|
871 |
+
" <td>1</td>\n",
|
872 |
+
" <td>0</td>\n",
|
873 |
+
" <td>0</td>\n",
|
874 |
+
" <td>0</td>\n",
|
875 |
+
" <td>...</td>\n",
|
876 |
+
" <td>1</td>\n",
|
877 |
+
" <td>1</td>\n",
|
878 |
+
" <td>0</td>\n",
|
879 |
+
" <td>0</td>\n",
|
880 |
+
" <td>0</td>\n",
|
881 |
+
" <td>1</td>\n",
|
882 |
+
" <td>0</td>\n",
|
883 |
+
" <td>1</td>\n",
|
884 |
+
" <td>0</td>\n",
|
885 |
+
" <td>0</td>\n",
|
886 |
+
" </tr>\n",
|
887 |
+
" <tr>\n",
|
888 |
+
" <th>111525</th>\n",
|
889 |
+
" <td>111525</td>\n",
|
890 |
+
" <td>WhatsForLunch</td>\n",
|
891 |
+
" <td>0</td>\n",
|
892 |
+
" <td>0</td>\n",
|
893 |
+
" <td>0</td>\n",
|
894 |
+
" <td>0</td>\n",
|
895 |
+
" <td>1</td>\n",
|
896 |
+
" <td>0</td>\n",
|
897 |
+
" <td>0</td>\n",
|
898 |
+
" <td>0</td>\n",
|
899 |
+
" <td>...</td>\n",
|
900 |
+
" <td>1</td>\n",
|
901 |
+
" <td>0</td>\n",
|
902 |
+
" <td>0</td>\n",
|
903 |
+
" <td>1</td>\n",
|
904 |
+
" <td>0</td>\n",
|
905 |
+
" <td>0</td>\n",
|
906 |
+
" <td>0</td>\n",
|
907 |
+
" <td>1</td>\n",
|
908 |
+
" <td>0</td>\n",
|
909 |
+
" <td>0</td>\n",
|
910 |
+
" </tr>\n",
|
911 |
+
" <tr>\n",
|
912 |
+
" <th>111535</th>\n",
|
913 |
+
" <td>111535</td>\n",
|
914 |
+
" <td>XiangIsDumb</td>\n",
|
915 |
+
" <td>0</td>\n",
|
916 |
+
" <td>0</td>\n",
|
917 |
+
" <td>1</td>\n",
|
918 |
+
" <td>0</td>\n",
|
919 |
+
" <td>0</td>\n",
|
920 |
+
" <td>0</td>\n",
|
921 |
+
" <td>0</td>\n",
|
922 |
+
" <td>0</td>\n",
|
923 |
+
" <td>...</td>\n",
|
924 |
+
" <td>1</td>\n",
|
925 |
+
" <td>1</td>\n",
|
926 |
+
" <td>0</td>\n",
|
927 |
+
" <td>0</td>\n",
|
928 |
+
" <td>1</td>\n",
|
929 |
+
" <td>0</td>\n",
|
930 |
+
" <td>0</td>\n",
|
931 |
+
" <td>1</td>\n",
|
932 |
+
" <td>0</td>\n",
|
933 |
+
" <td>0</td>\n",
|
934 |
+
" </tr>\n",
|
935 |
+
" <tr>\n",
|
936 |
+
" <th>111537</th>\n",
|
937 |
+
" <td>111537</td>\n",
|
938 |
+
" <td>XxxX01</td>\n",
|
939 |
+
" <td>1</td>\n",
|
940 |
+
" <td>0</td>\n",
|
941 |
+
" <td>0</td>\n",
|
942 |
+
" <td>0</td>\n",
|
943 |
+
" <td>0</td>\n",
|
944 |
+
" <td>0</td>\n",
|
945 |
+
" <td>0</td>\n",
|
946 |
+
" <td>0</td>\n",
|
947 |
+
" <td>...</td>\n",
|
948 |
+
" <td>1</td>\n",
|
949 |
+
" <td>0</td>\n",
|
950 |
+
" <td>1</td>\n",
|
951 |
+
" <td>0</td>\n",
|
952 |
+
" <td>1</td>\n",
|
953 |
+
" <td>0</td>\n",
|
954 |
+
" <td>0</td>\n",
|
955 |
+
" <td>1</td>\n",
|
956 |
+
" <td>0</td>\n",
|
957 |
+
" <td>0</td>\n",
|
958 |
+
" </tr>\n",
|
959 |
+
" <tr>\n",
|
960 |
+
" <th>111538</th>\n",
|
961 |
+
" <td>111538</td>\n",
|
962 |
+
" <td>Yellowsubmarine</td>\n",
|
963 |
+
" <td>0</td>\n",
|
964 |
+
" <td>0</td>\n",
|
965 |
+
" <td>1</td>\n",
|
966 |
+
" <td>0</td>\n",
|
967 |
+
" <td>0</td>\n",
|
968 |
+
" <td>0</td>\n",
|
969 |
+
" <td>0</td>\n",
|
970 |
+
" <td>0</td>\n",
|
971 |
+
" <td>...</td>\n",
|
972 |
+
" <td>0</td>\n",
|
973 |
+
" <td>1</td>\n",
|
974 |
+
" <td>1</td>\n",
|
975 |
+
" <td>0</td>\n",
|
976 |
+
" <td>1</td>\n",
|
977 |
+
" <td>0</td>\n",
|
978 |
+
" <td>0</td>\n",
|
979 |
+
" <td>1</td>\n",
|
980 |
+
" <td>0</td>\n",
|
981 |
+
" <td>0</td>\n",
|
982 |
+
" </tr>\n",
|
983 |
+
" </tbody>\n",
|
984 |
+
"</table>\n",
|
985 |
+
"<p>33442 rows × 73 columns</p>\n",
|
986 |
+
"</div>"
|
987 |
+
],
|
988 |
+
"text/plain": [
|
989 |
+
" Unnamed: 0 game r1_SCORE1 r1_SCORE2 r1_SCORE3 \\\n",
|
990 |
+
"0 0 0000000001 0 0 0 \n",
|
991 |
+
"4 4 060303 0 1 0 \n",
|
992 |
+
"6 6 070315 0 1 0 \n",
|
993 |
+
"9 9 0pandoraravenclaw 0 1 0 \n",
|
994 |
+
"21 21 16JULY2015 0 0 0 \n",
|
995 |
+
"... ... ... ... ... ... \n",
|
996 |
+
"111522 111522 WelcomeFastPlayer 0 0 0 \n",
|
997 |
+
"111525 111525 WhatsForLunch 0 0 0 \n",
|
998 |
+
"111535 111535 XiangIsDumb 0 0 1 \n",
|
999 |
+
"111537 111537 XxxX01 1 0 0 \n",
|
1000 |
+
"111538 111538 Yellowsubmarine 0 0 1 \n",
|
1001 |
+
"\n",
|
1002 |
+
" r1_SCORE4 r1_SCORE5 r1_SCORE6 r1_SCORE7 r1_SCORE8 ... BON8 \\\n",
|
1003 |
+
"0 0 0 0 0 1 ... 0 \n",
|
1004 |
+
"4 0 0 0 0 0 ... 1 \n",
|
1005 |
+
"6 0 0 0 0 0 ... 1 \n",
|
1006 |
+
"9 0 0 0 0 0 ... 0 \n",
|
1007 |
+
"21 0 1 0 0 0 ... 0 \n",
|
1008 |
+
"... ... ... ... ... ... ... ... \n",
|
1009 |
+
"111522 0 1 0 0 0 ... 1 \n",
|
1010 |
+
"111525 0 1 0 0 0 ... 1 \n",
|
1011 |
+
"111535 0 0 0 0 0 ... 1 \n",
|
1012 |
+
"111537 0 0 0 0 0 ... 1 \n",
|
1013 |
+
"111538 0 0 0 0 0 ... 0 \n",
|
1014 |
+
"\n",
|
1015 |
+
" BON9 BON10 2players 3players 4players 5players map1 map2 map3 \n",
|
1016 |
+
"0 1 1 1 0 0 0 1 0 0 \n",
|
1017 |
+
"4 1 1 0 0 1 0 0 1 0 \n",
|
1018 |
+
"6 1 1 0 0 1 0 1 0 0 \n",
|
1019 |
+
"9 0 0 1 0 0 0 1 0 0 \n",
|
1020 |
+
"21 1 0 0 0 1 0 1 0 0 \n",
|
1021 |
+
"... ... ... ... ... ... ... ... ... ... \n",
|
1022 |
+
"111522 1 0 0 0 1 0 1 0 0 \n",
|
1023 |
+
"111525 0 0 1 0 0 0 1 0 0 \n",
|
1024 |
+
"111535 1 0 0 1 0 0 1 0 0 \n",
|
1025 |
+
"111537 0 1 0 1 0 0 1 0 0 \n",
|
1026 |
+
"111538 1 1 0 1 0 0 1 0 0 \n",
|
1027 |
+
"\n",
|
1028 |
+
"[33442 rows x 73 columns]"
|
1029 |
+
]
|
1030 |
+
},
|
1031 |
+
"execution_count": 64,
|
1032 |
+
"metadata": {},
|
1033 |
+
"output_type": "execute_result"
|
1034 |
+
}
|
1035 |
+
],
|
1036 |
+
"source": [
|
1037 |
+
"featdf[~indexs]"
|
1038 |
+
]
|
1039 |
+
},
|
1040 |
+
{
|
1041 |
+
"cell_type": "code",
|
1042 |
+
"execution_count": 67,
|
1043 |
+
"id": "a101ac03-1fe7-452f-a7b2-ad702136de81",
|
1044 |
+
"metadata": {},
|
1045 |
+
"outputs": [],
|
1046 |
+
"source": [
|
1047 |
+
"each_faction_dataset = {}\n",
|
1048 |
+
"for faction in factions:\n",
|
1049 |
+
" faction_dataset = {}\n",
|
1050 |
+
" indexes = pd.isnull(vpdf[faction])\n",
|
1051 |
+
" faction_dataset['vp'] = vpdf[faction][~indexes]\n",
|
1052 |
+
" faction_dataset['features'] = featdf[~indexs]\n",
|
1053 |
+
" each_faction_dataset[faction] = faction_dataset\n",
|
1054 |
+
" "
|
1055 |
+
]
|
1056 |
+
},
|
1057 |
+
{
|
1058 |
+
"cell_type": "code",
|
1059 |
+
"execution_count": null,
|
1060 |
+
"id": "60fd33be-c671-4112-9112-22b38df7fe08",
|
1061 |
+
"metadata": {},
|
1062 |
+
"outputs": [],
|
1063 |
+
"source": []
|
1064 |
+
}
|
1065 |
+
],
|
1066 |
+
"metadata": {
|
1067 |
+
"kernelspec": {
|
1068 |
+
"display_name": "Python 3",
|
1069 |
+
"language": "python",
|
1070 |
+
"name": "python3"
|
1071 |
+
},
|
1072 |
+
"language_info": {
|
1073 |
+
"codemirror_mode": {
|
1074 |
+
"name": "ipython",
|
1075 |
+
"version": 3
|
1076 |
+
},
|
1077 |
+
"file_extension": ".py",
|
1078 |
+
"mimetype": "text/x-python",
|
1079 |
+
"name": "python",
|
1080 |
+
"nbconvert_exporter": "python",
|
1081 |
+
"pygments_lexer": "ipython3",
|
1082 |
+
"version": "3.7.4"
|
1083 |
+
}
|
1084 |
+
},
|
1085 |
+
"nbformat": 4,
|
1086 |
+
"nbformat_minor": 5
|
1087 |
+
}
|
faction-picker-bot/.ipynb_checkpoints/make_data-checkpoint.py
ADDED
@@ -0,0 +1,178 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import pandas as pd
|
2 |
+
import numpy as np
|
3 |
+
import math
|
4 |
+
import time
|
5 |
+
|
6 |
+
def main():
|
7 |
+
"""This is the script version of creatingVPdata.ipynb for the dvc pipeline."""
|
8 |
+
# load data in
|
9 |
+
folderlocation = "D:/PycharmProjects/TerraBot/terra-mystica"
|
10 |
+
gameevents = pd.read_csv(f'{folderlocation}/game_events.csv')
|
11 |
+
games = pd.read_csv(f'{folderlocation}/games.csv')
|
12 |
+
gameslist = list(pd.unique(gameevents['game']))
|
13 |
+
allfactions = pd.unique(gameevents['faction'])
|
14 |
+
gamescoringtiles = pd.read_csv(f'{folderlocation}/game_scoring_tiles.csv')
|
15 |
+
gameoptions = pd.read_csv(f'{folderlocation}/game_options.csv')
|
16 |
+
stats = pd.read_csv(f'{folderlocation}/stats.csv')
|
17 |
+
|
18 |
+
# two vp dataset functions
|
19 |
+
def makenewdf():
|
20 |
+
"""make an empty dataframe, organised in the way we want the target data, ready to be populated"""
|
21 |
+
validfactions = ['witches', 'auren', 'swarmlings', 'mermaids', 'cultists', 'halflings', 'dwarves', 'engineers', 'chaosmagicians', 'giants', 'fakirs', 'nomads', 'darklings', 'alchemists']
|
22 |
+
dfcols = ['game'] + validfactions
|
23 |
+
vpdf = pd.DataFrame(columns=dfcols)
|
24 |
+
|
25 |
+
return vpdf, dfcols, validfactions
|
26 |
+
|
27 |
+
vpdf, dfcols, validfactions = makenewdf()
|
28 |
+
|
29 |
+
def get_vp_from_game(singleGameEvents):
|
30 |
+
"""Input game events for a single game. This is a pd.DataFrame.
|
31 |
+
Output a row where each faction in the game has its vp populated (the rest are nans)
|
32 |
+
"""
|
33 |
+
newdf = pd.DataFrame([[np.nan] * 15], columns=dfcols)
|
34 |
+
|
35 |
+
# assign the game number
|
36 |
+
gameno = list(pd.unique(singleGameEvents['game']))
|
37 |
+
|
38 |
+
# assert len(gameno) == 1, 'More than 1 unique game was found'
|
39 |
+
try:
|
40 |
+
newdf['game'].replace({np.nan: gameno[0]}, inplace=True)
|
41 |
+
except:
|
42 |
+
print(f'DEBUGGING: len of table is {len(singleGameEvents)}')
|
43 |
+
print(f'DEBUGGING: gamnos list: {gameno}')
|
44 |
+
print(singleGameEvents)
|
45 |
+
raise
|
46 |
+
|
47 |
+
# find factions - there are some artifacts in the data. E.g. the "faction", "all". We need to filter them out.
|
48 |
+
rawfactions = list(pd.unique(singleGameEvents['faction']))
|
49 |
+
verifiedfactions = [rawfaction for rawfaction in rawfactions if rawfaction in validfactions]
|
50 |
+
|
51 |
+
for faction in verifiedfactions:
|
52 |
+
vpfaction = sum(singleGameEvents[(singleGameEvents['event'] == 'vp') & (singleGameEvents['faction'] == faction)]['num'])
|
53 |
+
newdf[faction].replace({np.nan: vpfaction}, inplace=True)
|
54 |
+
|
55 |
+
return newdf
|
56 |
+
|
57 |
+
# two features dataset functions
|
58 |
+
def emptyfeaturesdf():
|
59 |
+
"""make an empty dataframe, organised in the way we want the feature data, ready to be populated"""
|
60 |
+
colnames = ['game']
|
61 |
+
uniqueScoreTiles = np.sort(pd.unique(gamescoringtiles['tile']))
|
62 |
+
|
63 |
+
# One-hot of round tiles, for each round
|
64 |
+
for gameround in range(1, 7):
|
65 |
+
roundstr = f'r{gameround}'
|
66 |
+
for tile in uniqueScoreTiles:
|
67 |
+
colnames.append(roundstr + '_' + tile)
|
68 |
+
|
69 |
+
# Boolean of bonus tiles
|
70 |
+
for bon in range(1, 11):
|
71 |
+
colnames.append(f'BON{bon}')
|
72 |
+
|
73 |
+
# One-hot player count (from 2, 3, 4 or 5 players)
|
74 |
+
for player in range(2, 6):
|
75 |
+
colnames.append(f'{player}players')
|
76 |
+
|
77 |
+
# one hot of the map used
|
78 |
+
"""126fe960806d587c78546b30f1a90853b1ada468 - map1
|
79 |
+
95a66999127893f5925a5f591d54f8bcb9a670e6 - map2
|
80 |
+
be8f6ebf549404d015547152d5f2a1906ae8dd90 - map3
|
81 |
+
"""
|
82 |
+
colnames = colnames + ['map1', 'map2', 'map3']
|
83 |
+
|
84 |
+
featuresdf = pd.DataFrame(columns=colnames)
|
85 |
+
|
86 |
+
return featuresdf, colnames
|
87 |
+
|
88 |
+
featuresdf, featcolnames = emptyfeaturesdf()
|
89 |
+
|
90 |
+
def get_features_from_game(singlegameevents, singlegamemeta, singlegameST, singleendplayers=None):
|
91 |
+
"""
|
92 |
+
Inputs:
|
93 |
+
singlegameevents <pd.DataFrame> - is game events for a single game
|
94 |
+
singlegamemeta <pd.DataFrame> - is a single row from `games` that gives map & player count
|
95 |
+
singlegameST <pd.DataFrame> - is a single row from `gamescoringtiles` that gives... score tile (suprisingly)
|
96 |
+
singleendplayers <pd.DataFrame> - is a single row from `end players` that gives the amount of players at end of game, after dropouts
|
97 |
+
Return: <pd.DataFrame> - a row where features have been found (will be sparse)
|
98 |
+
"""
|
99 |
+
newdf = pd.DataFrame([[0] * len(featcolnames)], columns=featcolnames)
|
100 |
+
|
101 |
+
# assign game string
|
102 |
+
singlegamemeta.iloc[0]['game']
|
103 |
+
newdf['game'].replace({0: singlegamemeta.iloc[0]['game']}, inplace=True)
|
104 |
+
|
105 |
+
# find the round tiles for each round
|
106 |
+
for gameround in range(1, 7):
|
107 |
+
roundstr = f'r{gameround}'
|
108 |
+
scoretile = roundstr + '_' + singlegameST[singlegameST['round'] == gameround]['tile'].values[0]
|
109 |
+
newdf[scoretile].replace({0: 1}, inplace=True)
|
110 |
+
|
111 |
+
# Boolean of bonus tiles
|
112 |
+
uniqueevents = list(pd.unique(singlegameevents['event']))
|
113 |
+
bonustiles = [event[5:] for event in uniqueevents if event.startswith('pass:BON')]
|
114 |
+
for bontile in bonustiles:
|
115 |
+
newdf[bontile].replace({0: 1}, inplace=True)
|
116 |
+
|
117 |
+
# One-hot player count (from 2, 3, 4 or 5 players)
|
118 |
+
if singleendplayers is None:
|
119 |
+
noplayers = singlegamemeta.iloc[0]['player_count']
|
120 |
+
print('gamemeta used for player count')
|
121 |
+
else:
|
122 |
+
noplayers = singleendplayers.iloc[0]['endplayers']
|
123 |
+
|
124 |
+
players = f'{noplayers}players'
|
125 |
+
newdf[players].replace({0: 1}, inplace=True)
|
126 |
+
|
127 |
+
# one hot of the map used
|
128 |
+
mapdict = {'126fe960806d587c78546b30f1a90853b1ada468': 'map1',
|
129 |
+
'95a66999127893f5925a5f591d54f8bcb9a670e6': 'map2',
|
130 |
+
'be8f6ebf549404d015547152d5f2a1906ae8dd90': 'map3'
|
131 |
+
}
|
132 |
+
basemap = singlegamemeta.iloc[0]['base_map']
|
133 |
+
gamemap = mapdict[basemap]
|
134 |
+
newdf[gamemap].replace({0: 1}, inplace=True)
|
135 |
+
|
136 |
+
return newdf
|
137 |
+
|
138 |
+
# filtering
|
139 |
+
# making a dataset for ease
|
140 |
+
data = dict()
|
141 |
+
data['gameevents'] = gameevents
|
142 |
+
data['games'] = games
|
143 |
+
data['gamescoringtiles'] = gamescoringtiles
|
144 |
+
|
145 |
+
def filteringByBadgames(data, badgames):
|
146 |
+
""" Data is a dict containing gameevents, games, gamescoringtiles
|
147 |
+
badgames is a pd.dataframe that contains ['game'] to filter by
|
148 |
+
"""
|
149 |
+
gameeventsfil = data['gameevents']
|
150 |
+
gamesfil = data['games']
|
151 |
+
gamescoringtilesfil = data['gamescoringtiles']
|
152 |
+
|
153 |
+
badgameslist = badgames['game']
|
154 |
+
gameeventsfilbefore = len(gameeventsfil)
|
155 |
+
gamesbefore = len(gamesfil)
|
156 |
+
gameSTbefore = len(gamescoringtilesfil)
|
157 |
+
|
158 |
+
gameeventsfil = gameeventsfil[~gameeventsfil['game'].isin(badgameslist)]
|
159 |
+
gamesfil = gamesfil[~gamesfil['game'].isin(badgameslist)]
|
160 |
+
gamescoringtilesfil = gamescoringtilesfil[~gamescoringtilesfil['game'].isin(badgameslist)]
|
161 |
+
|
162 |
+
print(f'game events before: {gameeventsfilbefore}, game events after: {len(gameeventsfil)}, game events removed: {gameeventsfilbefore-len(gameeventsfil)}')
|
163 |
+
print(f'games before: {gamesbefore}, games after: {len(gamesfil)}, games removed: {gamesbefore-len(gamesfil)}')
|
164 |
+
print(f'gameST before: {gameSTbefore}, gameST after: {len(gamescoringtilesfil)}, games removed: {gameSTbefore-len(gamescoringtilesfil)}')
|
165 |
+
|
166 |
+
data['gameevents'] = gameeventsfil
|
167 |
+
data['games'] = gamesfil
|
168 |
+
data['gamescoringtiles'] = gamescoringtilesfil
|
169 |
+
|
170 |
+
return data
|
171 |
+
|
172 |
+
# player count
|
173 |
+
badgames = games[games["player_count"].isin([1, 6, 7])]
|
174 |
+
data = filteringByBadgames(data, badgames)
|
175 |
+
|
176 |
+
|
177 |
+
if __name__ == "__main__":
|
178 |
+
main()
|
faction-picker-bot/.ipynb_checkpoints/shap_metrics-checkpoint.ipynb
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cells": [],
|
3 |
+
"metadata": {},
|
4 |
+
"nbformat": 4,
|
5 |
+
"nbformat_minor": 5
|
6 |
+
}
|
faction-picker-bot/.ipynb_checkpoints/testdvc-checkpoint.ipynb
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cells": [
|
3 |
+
{
|
4 |
+
"cell_type": "code",
|
5 |
+
"execution_count": 2,
|
6 |
+
"metadata": {},
|
7 |
+
"outputs": [],
|
8 |
+
"source": [
|
9 |
+
"import pandas as pd\n",
|
10 |
+
"\n",
|
11 |
+
"test = pd.DataFrame([[1, 2]], columns=['col1', 'col2'])\n",
|
12 |
+
"test.to_csv('D://PycharmProjects/TerraBot/data/faction-picker-bot/testdvc.csv')"
|
13 |
+
]
|
14 |
+
},
|
15 |
+
{
|
16 |
+
"cell_type": "code",
|
17 |
+
"execution_count": null,
|
18 |
+
"metadata": {},
|
19 |
+
"outputs": [],
|
20 |
+
"source": []
|
21 |
+
}
|
22 |
+
],
|
23 |
+
"metadata": {
|
24 |
+
"kernelspec": {
|
25 |
+
"display_name": "Python 3",
|
26 |
+
"language": "python",
|
27 |
+
"name": "python3"
|
28 |
+
},
|
29 |
+
"language_info": {
|
30 |
+
"codemirror_mode": {
|
31 |
+
"name": "ipython",
|
32 |
+
"version": 3
|
33 |
+
},
|
34 |
+
"file_extension": ".py",
|
35 |
+
"mimetype": "text/x-python",
|
36 |
+
"name": "python",
|
37 |
+
"nbconvert_exporter": "python",
|
38 |
+
"pygments_lexer": "ipython3",
|
39 |
+
"version": "3.7.4"
|
40 |
+
}
|
41 |
+
},
|
42 |
+
"nbformat": 4,
|
43 |
+
"nbformat_minor": 4
|
44 |
+
}
|