AlphaTac-AI / AlphaTac-Backend

The rock of AlphaTac AI
MIT License
1 stars 1 forks source link

DB Schema #1

Open PeiShang opened 6 years ago

PeiShang commented 6 years ago

项目数据库中可能需要的数据表和数据结构

ChanglongYe commented 6 years ago

使用Mongo DB如何,我研究一下

PeiShang commented 6 years ago

对于训练模型来讲,我能想到的数据有:

  1. 战队数据。例如按rating排列前2k的战队ID,名称(英文),rating, 成员,每个成员天梯分(MMR)等。
  2. 比赛数据。 如果是存在我们的DB里面,可以尽量存入多的信息,不用做feature(字段)上的筛选,但可以对sample进行一些控制,保证存入数据库中的尽量是高质量的数据。 由于还要加入ban pick预测和推荐,所以比赛数据还要包括近一段时间内天梯高分局的比赛数据。
ChanglongYe commented 6 years ago

数据获取的方式: image

PeiShang commented 6 years ago

Match detail

api:https://api.opendota.com/api/matches/{match_id}

{
    "match_id": , 
    "barracks_status_dire": ,
    "barracks_status_radiant": ,
    "dire_score": , 
    "dire_team_id": ,
    "radiant_score": ,
    "radiant_team_id": ,
    "duration": ,
    "draft_timings": {...},
    "first_blood_time": ,
    "radiant_gold_adv": ,
    "radiant_xp_adv": ,
    "radiant_win": ,
    "start_time": ,
    "tower_status_dire": ,
    "tower_status_radiant": ,
    "players":
        {
            "account_id": ,
            "assists": ,
            "deaths": ,
            "gold_per_min": ,
            "hero_damage": ,
            "hero_healing": ,
            "hero_id": ,
            "kills": ,
            "level": ,
            "teamfight_participation": ,
            "tower_damage": ,
            "towers_killed": ,
            "xp_per_min": ,
            "total_gold": ,
            "total_xp": ,
            "kda": ,
            "lane_efficiency": ,
            "lane_efficiency_pct": ,
            "lane_role": ,
        }
}

Teams

api: https://api.opendota.com/api/teams/{team_id} https://api.opendota.com/api/teams/{team_id}/players https://api.opendota.com/api/players/{account_id}

{
    "team_id": ,
    "rating": ,
    "wins": ,
    "losses": ,
    "last_match_time": ,
    "name": ,
    "tag": ,
    "logo_url": ,
    "players": 
        {
            "account_id": ,
            "name": ,
            "games_played": ,
            "wins": ,
            "solo_competitive_rank": ,
            "competitive_rank": ,
            "rank_tier": ,
            "leaderboard_rank": ,
            "mmr_estimate": {...}
        }
}

Team matches

api:https://api.opendota.com/api/teams/{team_id}/matches

{
    "team_id": ,
    "match_id": ,
    "start_time": ,
    "leagueid": ,
    "league_name"
}

Matches to show

{
    "league_name": ,
    "best_of": , 
    "start_time": ,
    "status": ,
    "radiant_team_logo": ,
    "radiant_team_name": ,
    "radiant_team_win_proba": ,
    "dire_team_logo": ,
    "dire_team_name": ,
    "dire_team_win_proba": ,
    "current_score": ,
}