# Part 4: Coding the Prisoner's Dilemma Game

In this section, we break down the initial process of creating an experiment into subparts, for clarity.

If you have any problems along the way, you may refer to [this GitHub repository](https://github.com/JamesPHoughton/prisonersDilemmaDemo) that contains all the code contained in the following parts.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.empirica.ly/tutorials/beginner-experiment-prisoners-dilemma/part-4-coding-the-prisoners-dilemma-game.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
