Rest Api Manual TSP

To be read in conjunction with main Rest API Manual page:

GameStyle values

Note: This is a quick reference, these styles are subject to change. To see the definitive list, use the GetGameStyles API call or log in to your account and use the following link:
http://beta.aigaming.com/GameInfo##GameStyles:TSP

Style Id Stake Game Duration (s) Number of Cities
? 0 10 10
? 1 20 20
? 10 30 50
? 100 60 100

GameStateType - for GameType ?: Travelling Salesman Problem

Name Type Notes
CityCoords Point[] List of coordinates of cities for this game
GameEnds datetime The time at which the game will end and the current leader become the winner in UTC
GameId int Unique id for this game
GameStatus string Text description of current status of game, e.g. RUNNING or DRAWN
IsLeading bool If this player is currently leading, this is true
LeadingDistance double Total distance of leading solution
LeadingSolution int[] The currently leading list of indices of cities in order
MandatoryResponse bool If true, indicates that the client will lose the game if they do not submit a move by the timeout deadline - false for TSP

Point

int x; // Coordinates are positive integers between 1 and 1000
int y;

MoveType - for GameType ?: Travelling Salesman Problem

Name Type Notes
Solution int[] A list of indices of cities in order of which to visit. The server will return INVALID_MOVE if the solution is invalid
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License