Metadata-Version: 2.4
Name: deepqlearn
Version: 0.1.1
Summary: A simple Deep Q-Network implementation in PyTorch
Project-URL: Homepage, https://github.com/yourusername/deepqlearn
Project-URL: Issues, https://github.com/yourusername/deepqlearn/issues
Author: Prathamesh Jadhav
License: MIT
License-File: LICENSE
Keywords: deep q network,dqn,reinforcement learning
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.8
Description-Content-Type: text/markdown

Got it — you want **one single markdown block** containing the entire README from title to author so you can copy it in one click.

Here’s your complete README:

````markdown
# DeepQlearn

A simple and clean **Deep Q-Network (DQN)** implementation in PyTorch, packaged for easy installation via PyPI.

---

## ✨ Features
- Minimal, readable code for learning DQN fundamentals
- Works with any [Gym](https://www.gymlibrary.dev/) environment
- Epsilon-greedy exploration strategy
- Replay buffer for experience sampling
- Target network updates for stable training
- Implemented in [PyTorch](https://pytorch.org)

---

## 📦 Installation

```bash
pip install deepqlearn
````

## Requirements:

```bash
Python >= 3.8
PyTorch
Gym
```

---

## 🚀 Quick Start

```python
from deepqlearn import train_dqn

# Train on CartPole for 200 episodes
train_dqn(episodes=200)
```

---

## 📚 API Reference

### `train_dqn(episodes=500, batch_size=64, target_update=10)`

Train a DQN agent on `CartPole-v1`.

**Parameters:**

* `episodes` *(int)* → Number of episodes to train for
* `batch_size` *(int)* → Mini-batch size for replay
* `target_update` *(int)* → Frequency (in episodes) to update the target network

---

### `DQNAgent`

A reinforcement learning agent using Deep Q-Learning.

**Constructor:**

```python
DQNAgent(
    state_dim,
    action_dim,
    lr=1e-3,
    gamma=0.99,
    epsilon=1.0,
    epsilon_min=0.01,
    epsilon_decay=0.995
)
```

**Key Methods:**

* `act(state)` → Choose an action given a state
* `remember(state, action, reward, next_state, done)` → Store experience in replay buffer
* `replay(batch_size)` → Train from replay buffer
* `update_target()` → Update target network with policy weights

---

## 📝 Example Training Script

```python
import gym
from deepqlearn import DQNAgent

env = gym.make("CartPole-v1")
agent = DQNAgent(env.observation_space.shape[0], env.action_space.n)

for episode in range(100):
    state = env.reset()[0]
    done = False
    total_reward = 0
    while not done:
        action = agent.act(state)
        next_state, reward, done, _, _ = env.step(action)
        agent.remember(state, action, reward, next_state, done)
        agent.replay(batch_size=64)
        state = next_state
        total_reward += reward
    agent.update_target()
    print(f"Episode {episode} — Reward: {total_reward}")

env.close()
```

---

## 📂 Project Structure

```bash
deepqlearn/
│
├── src/
│   └── deepqlearn/
│       ├── __init__.py
│       ├── agent.py
│       ├── network.py
│       ├── replay_buffer.py
│       ├── train.py
│
├── pyproject.toml
├── setup.cfg
├── README.md
├── LICENSE
└── .gitignore
```

---

## ⚖ License

MIT License

---

## 👤 Author

Prathamesh Jadhav

