Reinforcement Learning Lab

Train a tabular Q-learning Connect4 policy against local heuristic opponents and store the resulting artifact as an activatable model.

RL training runs on the local Connect4 engine, so the same bounded job flow works in cloud deployments.

Developer Notes

How the tabular Q-learning policy is structured and updated.

State

One sparse Q-table row per board-state-and-mark combination.

Policy

Epsilon-greedy over legal columns: mostly exploit the best-known move, sometimes explore.

Reward

Wins reward strongly, losses penalize strongly, ties reward modestly, and non-terminal moves incur a small shaping penalty.

Pseudocode

for each episode:
  state = reset(board, opening order)
  while not done:
    action = epsilon_greedy(Q[state], legal_columns)
    next_state, reward, done = env.step(action)
    Q[state, action] = (1 - alpha) * Q[state, action]
                     + alpha * (reward + gamma * max(Q[next_state]))
    state = next_state
  decay epsilon
  occasionally decay alpha

RL Job Status

No active RL job.

No metrics yet.

Recent RL Jobs

ID Status Progress Model ID Opponent Final 100 Avg Reward