Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Вивчайте Challenge: Q-table Update with Q-learning | Classic RL Algorithms: Q-learning & SARSA
Hands-On Classic RL Algorithms with Python
Секція 1. Розділ 3
single

single

Challenge: Q-table Update with Q-learning

Свайпніть щоб показати меню

Завдання

Проведіть, щоб почати кодувати

Challenge: Given a Q-table and a sequence of actions, update the Q-values using the Q-learning rule.

  • For each transition in transitions, update the Q-value in q_table for the given state and action using the Q-learning update formula.
  • Each transition is a tuple: (state, action, reward, next_state).
  • Use the learning rate alpha and discount factor gamma for the update.
  • The Q-learning update formula is:
    Q[state, action] = Q[state, action] + alpha * (reward + gamma * max(Q[next_state]) - Q[state, action]).

Рішення

Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 1. Розділ 3
single

single

Запитати АІ

expand

Запитати АІ

ChatGPT

Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат

some-alt