# Get action: ref data

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

## Examples

### Wordle

<figure><img src="https://3691668748-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpNqFLvMdyPuc81kfsqTa%2Fuploads%2FDoqhje53sggIrW2Hn7ES%2Fimage.png?alt=media&#x26;token=e22547c8-5f00-4eaa-b181-b438b1a8a670" alt="" width="186"><figcaption><p>Wordle game</p></figcaption></figure>

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 [ref\_data.json](https://d22cv6d99w4a17.cloudfront.net/wordle/ref_data.json) for Wordle. The proto schema for it is:

```protobuf
message refData {
  repeated string words = 1;
}
```

The bot can access ref\_data by:

{% tabs %}
{% tab title="Python" %}

```python
def get_action(state, ref_data, api):
    words = ref_data["words"]
    # ... Pick from one of these words
```

{% endtab %}

{% tab title="Javascript" %}

```javascript
function getAction({state, refData, api}) {
  let words = refData["words"];
  // ... Pick from one of these words
}
```

{% endtab %}
{% endtabs %}

### Risk

<figure><img src="https://3691668748-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpNqFLvMdyPuc81kfsqTa%2Fuploads%2FT3qz4fvn5T6VOeoni92Q%2Fsmallearth.png?alt=media&#x26;token=d1fdf4f7-07c3-4cba-aa77-802a06ae3681" alt=""><figcaption><p>A game involving a map</p></figcaption></figure>

This game has a more complex example of [ref\_data.json](https://d22cv6d99w4a17.cloudfront.net/risk/ref_data.json). This map does not change throughout the game. A bot needs to know which areas are connected to determine what actions it should take.&#x20;
