Q-table
A Q-table is a lookup table storing estimated action values for state-action pairs in a tabular reinforcement-learning system.
Grokking AI Algorithms, Second Edition
A Q-table is a tabular reinforcement-learning model that stores estimated values for actions in particular states.
- How it is used
- Uses a Q-table as the learned model for selecting actions during and after Q-learning in a simulation.
- How deep it goes
- Traces initialization, action selection and table updates in a simulation, then tests the trained table.
- Examples
- Uses grid positions and a parking-lot simulation to illustrate state-action scores and testing.
- What you can do after
- Evaluate/understand how to select an action from a trained table and recognize its limits with unseen states.
Read how Grokking AI Algorithms, Second Edition explains Q-table →
Evolutionary Deep Learning: Genetic algorithms and neural networks
A Q-table is a tabular representation that stores estimated action-quality values for states in a Q-learning agent.
- How it is used
- Stores action-quality estimates that guide an agent’s next action in discrete reinforcement-learning environments.
- How deep it goes
- Defines the table layout, initialization, action policy, update equation, training loop, and exploration schedule without deriving Q-learning theory.
- Examples
- Uses OpenAI Gym’s FrozenLake environment, NumPy arrays, epsilon-greedy selection, training episodes, and evaluation runs.
- What you can do after
- Builds a tabular Q-learning agent, train it across episodes, and inspect its learned action values.
Read how Evolutionary Deep Learning: Genetic algorithms and neural networks explains Q-table →
Also covered in
- Applied Reinforcement LearningIn early access (MEAP)
- Data-Driven Cybersecurity
What to know first
- actionAn action is a choice or operation selected or performed by an actor that can affect a system, environment, or process.
- environmentAn environment is the external context, system, or conditions within which an agent or application operates and interacts.
- stateState is information describing the condition or configuration of a system or computation at a particular time that may influence its behavior or subsequent transitions.
- policyA policy is a rule, principle, or decision function that governs behavior or determines actions or permissions under specified conditions.
Related concepts
- language modelkind of · A language model is a computational model that represents patterns in linguistic sequences to assign probabilities, predict, generate, or evaluate language.
- Q-learningused by · Q-learning is a model-free reinforcement-learning algorithm that estimates state-action values through updates based on rewards and subsequent state values.
- action-value functionhas part · An action-value function maps a state and action to the expected cumulative return from taking that action and then following a specified policy.
- reward signalmeasures · A reward signal is a value or feedback indicating the desirability, benefit, or cost associated with an action, outcome, or behavior.
- tabular methodused by · A reinforcement-learning method that stores value estimates or policy information explicitly in lookup tables indexed by states or state-action pairs.
Questions about Q-table
What is Q-table?
A Q-table is a lookup table storing estimated action values for state-action pairs in a tabular reinforcement-learning system.
Which Manning books explain Q-table?
Grokking AI Algorithms, Second Edition and Evolutionary Deep Learning: Genetic algorithms and neural networks.
What should I know before learning Q-table?
Manning books that teach Q-table usually introduce action, environment, state and policy first.
What is Q-table a kind of?
Q-table is a kind of language model. A language model is a computational model that represents patterns in linguistic sequences to assign probabilities, predict, generate, or evaluate language.
What are the parts of Q-table?
Q-table includes action-value function.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

