Kaszanas / SC2_Datasets

https://sc2-datasets.readthedocs.io/
GNU General Public License v3.0
8 stars 3 forks source link

Outcomes: Victory vs Win #37

Open rhys-newbury opened 10 months ago

rhys-newbury commented 10 months ago
from sc2_datasets.torch.sc2_egset_dataset import SC2EGSetDataset
from sc2_datasets.available_replaypacks import SC2EGSET_DATASET_REPLAYPACKS
from sc2_datasets.transforms.pandas.player_stats_to_dict import playerstats_to_dict
from sc2_datasets.transforms.pandas.avg_playerstats_pd_dict import avg_playerstats_pd_dict_transform
if __name__ == "__main__":
    # Initialize the dataset:
    sc2_egset_dataset = SC2EGSetDataset(
        unpack_dir="./unpack_dir_path",           # Specify existing directory path, where the data will be unpacked.
        download_dir="./download_dir_path",       # Specify existing directory path, where the data will be downloaded.
        download=False,
        names_urls=SC2EGSET_DATASET_REPLAYPACKS, # Use a synthetic replaypack containing 1 replay.
    )

    # Iterate over instances:
    for i in range(len(sc2_egset_dataset)):
        x = sc2_egset_dataset[i]
        avg_playerstats_pd_dict_transform(x)

This code does not work, since you expect an outcome to be a 'Win' but the data says 'Victory'

rhys-newbury commented 10 months ago

Same issue with Defeat vs Loss

Kaszanas commented 10 months ago
from sc2_datasets.torch.sc2_egset_dataset import SC2EGSetDataset
from sc2_datasets.available_replaypacks import SC2EGSET_DATASET_REPLAYPACKS
from sc2_datasets.transforms.pandas.player_stats_to_dict import playerstats_to_dict
from sc2_datasets.transforms.pandas.avg_playerstats_pd_dict import avg_playerstats_pd_dict_transform
if __name__ == "__main__":
    # Initialize the dataset:
    sc2_egset_dataset = SC2EGSetDataset(
        unpack_dir="./unpack_dir_path",           # Specify existing directory path, where the data will be unpacked.
        download_dir="./download_dir_path",       # Specify existing directory path, where the data will be downloaded.
        download=False,
        names_urls=SC2EGSET_DATASET_REPLAYPACKS, # Use a synthetic replaypack containing 1 replay.
    )

    # Iterate over instances:
    for i in range(len(sc2_egset_dataset)):
        x = sc2_egset_dataset[i]
        avg_playerstats_pd_dict_transform(x)

This code does not work, since you expect an outcome to be a 'Win' but the data says 'Victory'

Nice catch! Seems like once again an issue with how many changes there were in StarCraft 2. I will create a map to have it all translated so that there are no discrepancies.

e.g.

2018_IEM_PyeongChang_data\dd998807b2eb48e8ae6892c767fed433.SC2Replay.json

vs

2016_IEM_10_Taipei_data\8c03f998ef5d41dba07ede7703b106ab.SC2Replay.json

  "ToonPlayerDescMap": {
    "98-S2-1-1636": {
      "nickname": "SpeCial",
      "playerID": 2,
      "userID": 3,
      "SQ": 125,
      "supplyCappedPercent": 3,
      "startDir": 7,
      "startLocX": 25,
      "startLocY": 21,
      "race": "Terr",
      "selectedRace": "Terr",
      "APM": 305,
      "MMR": 0,
      "result": "Win",
      "region": "Unknown",
      "realm": "Unknown",
      "highestLeague": "Unknown",
      "isInClan": false,
      "clanTag": "",
      "handicap": 100,
      "color": {
        "a": 255,
        "b": 0,
        "g": 66,
        "r": 255
      }
    },
    "98-S2-1-1638": {
      "nickname": "PandaBearMe",
      "playerID": 1,
      "userID": 2,
      "SQ": 126,
      "supplyCappedPercent": 1,
      "startDir": 2,
      "startLocX": 142,
      "startLocY": 134,
      "race": "Zerg",
      "selectedRace": "Zerg",
      "APM": 319,
      "MMR": 0,
      "result": "Loss",
      "region": "Unknown",
      "realm": "Unknown",
      "highestLeague": "Unknown",
      "isInClan": false,
      "clanTag": "",
      "handicap": 100,
      "color": {
        "a": 255,
        "b": 180,
        "g": 20,
        "r": 30
      }
    }
  },

vs

  "ToonPlayerDescMap": {
    "3-S2-1-5282248": {
      "nickname": "ByuN",
      "playerID": 0,
      "userID": 0,
      "SQ": 0,
      "supplyCappedPercent": 0,
      "startDir": 0,
      "startLocX": 0,
      "startLocY": 0,
      "race": "Terr",
      "selectedRace": "",
      "APM": 0,
      "MMR": 0,
      "result": "Victory",
      "region": "Korea",
      "realm": "Korea",
      "highestLeague": "Unranked",
      "isInClan": false,
      "clanTag": "",
      "handicap": 100,
      "color": {
        "a": 255,
        "b": 180,
        "g": 20,
        "r": 30
      }
    },
    "3-S2-1-5285856": {
      "nickname": "Lilbow",
      "playerID": 0,
      "userID": 0,
      "SQ": 0,
      "supplyCappedPercent": 0,
      "startDir": 0,
      "startLocX": 0,
      "startLocY": 0,
      "race": "Prot",
      "selectedRace": "",
      "APM": 0,
      "MMR": 0,
      "result": "Defeat",
      "region": "Korea",
      "realm": "Korea",
      "highestLeague": "Unranked",
      "isInClan": false,
      "clanTag": "",
      "handicap": 100,
      "color": {
        "a": 255,
        "b": 0,
        "g": 66,
        "r": 255
      }
    }
  },

Seems like the game engine naming has changed. I need to look into that further.

Once again I will post this against this repository to verify: https://github.com/Kaszanas/SC2InfoExtractorGo