百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
D

deep-q-learning

> 编程语言
开源

Keras 中的最小深度 Q 学习 (DQN 和 DDQN) 实现

1.3K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

Keras 中的最小深度 Q 学习 (DQN 和 DDQN) 实现

deep-q-learning

Introduction to Making a Simple Game AI with Deep Reinforcement Learning

Minimal and Simple Deep Q Learning Implemenation in Keras and Gym. Under 100 lines of code!

The explanation for the dqn.py code is covered in the blog article https://keon.kim/writing/deep-q-learning/

I made minor tweaks to this repository such as load and save functions for convenience.

I also made the memory a deque instead of just a list. This is in order to limit the maximum number of elements in the memory.

The training might be unstable for dqn.py. This problem is mitigated in ddqn.py. I'll cover ddqn in the next article.

Changelog

2026-05

  • Migrated from gym to gymnasium and updated for the modern reset/step API.
  • Updated for Keras 3 (Adam(learning_rate=), Input layer, keras.losses.Huber).
  • ddqn.py now implements actual Double DQN (online net selects, target net evaluates).
  • Removed CartPole-specific reward shaping from ddqn.py so it's env-agnostic.
  • save() / load() now persist epsilon alongside the weights.

2018-08

  • Split batched-update training into its own file (dqn_batch.py).

2017-06

  • Added Double DQN with Huber loss in ddqn.py.
  • Added requirements.txt.

2017-05

  • Migrated to the Keras 2 API.
  • Hyperparameter tuning that finally got dqn.py learning reliably on CartPole.

2017-02

  • Initial release: DQN agent on CartPole with experience replay (deque-bounded memory) and save / load helpers.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Pythonddqndeep-learningdeep-q-networkdeep-reinforcement-learning

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言