<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Q-Learning on Bharath's Blog</title><link>https://bharathbhushan1.github.io/blog/tags/q-learning/</link><description>Recent content in Q-Learning on Bharath's Blog</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Mon, 29 Jun 2026 08:30:00 +0530</lastBuildDate><atom:link href="https://bharathbhushan1.github.io/blog/tags/q-learning/index.xml" rel="self" type="application/rss+xml"/><item><title>A Tiny Q-learning Example in Python</title><link>https://bharathbhushan1.github.io/blog/posts/2026-06-29-simple-q-learning/</link><pubDate>Mon, 29 Jun 2026 08:30:00 +0530</pubDate><guid>https://bharathbhushan1.github.io/blog/posts/2026-06-29-simple-q-learning/</guid><description>&lt;p&gt;I wanted to get a better sense of the temporal-difference update rule. So took some help
from Claude and wrote a small Q-learning program. Just uses the python stdlib.
The code lives in &lt;a href="https://github.com/bharathbhushan1/ai-learning/tree/main/q-learning"&gt;&lt;code&gt;q-learning&lt;/code&gt;&lt;/a&gt;,
managed with &lt;a href="https://docs.astral.sh/uv/"&gt;uv&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img alt="A 1D line of six cells, 0 through 5; the agent starts at cell 0 and the learned policy points right at every step toward the goal at cell 5, with Q-values discounted back from the goal" loading="lazy" src="https://bharathbhushan1.github.io/blog/images/q-learning.svg"&gt;&lt;/p&gt;</description></item></channel></rss>