# Quick Start

## :rocket: DQN On CartPole

This quick demo will test that the installation works. We will run DQN on the CartPole environment. For now, don't worry about the details of the Python command, as we will walk through them in a [later section](https://slm-lab.gitbook.io/slm-lab/v4.2.0/using-slm-lab/slm-lab-command).

```
conda activate lab
python run_lab.py slm_lab/spec/demo.json dqn_cartpole dev
```

This will run a session that trains a DQN agent on the CartPole-v0 environment. Since the command above specifies **dev** mode, it enables verbose logging and environment rendering, which should be similar to the following screenshot:

![](https://2605794550-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LterKThgiKKTvsbx4WI%2F-LtetKRiyuf_T0VsPEXO%2F-Ltf-mfmQ_2A9UYZjlNv%2Fdqn_cartpole_demo.png?alt=media\&token=a77f44c6-1645-4885-948e-b58697d6cdec)

If you let the training session run for a few minutes, you should see the CartPole getting balanced for a longer period of time. Correspondingly, the `total_reward_ma` should increase.

{% hint style="success" %}
If this quick start works, then SLM Lab is ready for use.
{% endhint %}

{% hint style="info" %}
If you encounter an issue, consult the [**Help**](https://slm-lab.gitbook.io/slm-lab/v4.2.0/resources/help) page.
{% endhint %}


---

# 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://slm-lab.gitbook.io/slm-lab/v4.2.0/setup/quick-start.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.
