Botpot
Visit our website
  • Fundamentals
    • Botpot overview
    • Get action
      • Get action: game state
      • Get action: API object
      • Get action: action object
    • Specialized game concepts
      • Get action: ref data
      • Game settings
    • Botpot architecture
  • Games
    • Creating your first bot
    • Understanding game logic
    • Explore game documentations
      • Tic-Tac-Toe
      • Quoridor
      • Connect Four
      • Battleship
      • Virus War
      • Dots and Boxes
      • Hex
      • Reversi
      • Gomoku
      • Mancala
      • Uno
      • Big 2
      • Snake & Tetris
      • Checker
      • Generals
      • Blokus
      • Wordle
      • Chinese Checker
Powered by GitBook
On this page
  • Examples
  • Wordle
  • Risk

Was this helpful?

  1. Fundamentals
  2. Specialized game concepts

Get action: ref data

Last updated 1 year ago

Was this helpful?

Reference data is data that doesn't change throughout the game, but is needed for the bot to calculate its actions.

Examples

Wordle

message refData {
  repeated string words = 1;
}

The bot can access ref_data by:

def get_action(state, ref_data, api):
    words = ref_data["words"]
    # ... Pick from one of these words
function getAction({state, refData, api}) {
  let words = refData["words"];
  // ... Pick from one of these words
}

Risk

In a word game like Wordle where the bot needs to guess a 5 letter word, the bot needs to know a list of all 5 letter words. Here is for Wordle. The proto schema for it is:

This game has a more complex example of . This map does not change throughout the game. A bot needs to know which areas are connected to determine what actions it should take.

ref_data.json
ref_data.json
Wordle game
A game involving a map