bullseye-arrowQuickstart

Use our /simulate_fast endpoint to make a quick simulation by providing:

  • simulation_id: str, unique identifier for the simulation.

  • competition_name: str, competition in which to simulate.

  • team_name: str, name of the team you simulate in.

  • opponent_names: List[str], list of opponent team names to simulate against.

  • players_to_simulate: List[SimPlayerInfo], list of SimPlayerInfo dataclass instances describing players to simulate.

For each player you want to simulate, you have to provide the following attributes of the SimPlayerInfo dataclass:

  • player_id: str, a unique baller ID of the player. Use the endpoint /get_player_id endpoint to get it.

  • player_name: str, the player name.

  • position: str, the position in which you want to simulate the player, one between ["GK", "CB", "LB", "RB", "WB", "DF", "CM", "DM", "AM", "LM", "RM", "MF", "FW", "LW", "RW"] .

  • minutes: int, the number of minutes played you want to simulate, between 1 and 90.

  • team: str, the team in which you want to simulate the player.

These attributes make the model extremely granular.

How it works?

The endpoint automatically generates a full lineup for the team by inserting your player of interest, and it also generates a lineup for each opponent. It then simulates how your player would perform within the generated context.

Note that our model assumes knowing how teammates and opponents are performing. This is what makes it highly contextual. For example, if you want to simulate how Gyökeres and Eze would perform at Arsenal (two of the club’s moves this summer) against the Premier League’s top six teams, the model will generate full lineups with current Arsenal players around them, taking into account Arsenal’s recent form—meaning how their teammates are performing—as well as the recent form of the opponent teams’ players.

Utils endpoint

/get_competition_names: to get competition names in the way they are written in our database.

/get_team_names: to get team names in the way they are written in our database.

/get_all_player_names: to get player_names in the way they are written in our database.

Check the FastAPI docs for more details about all our endpoints at: https://smshgt2vqh.eu-west-3.awsapprunner.com/docsarrow-up-right

Example

Ouputs

Last updated