liveBook · Manning

Trial and error

Trial and error is an iterative problem-solving or learning process that tests alternatives, observes their outcomes, and uses feedback to guide subsequent actions.

How 2 Manning books explain it

Grokking AI Algorithms, Second Edition

Trial and error is a problem-solving technique that tests alternative attempts and uses their outcomes to identify a successful solution.

How it is used
Frames learning and search as repeated attempts guided by observed outcomes.
How deep it goes
Defines the technique through behavioral examples and a maze comparison, but stops short of implementing a search algorithm.
Examples
Uses chicks identifying food, chimpanzees choosing sticks, dog training, and competing paths through a maze.
What you can do after
Evaluate alternative actions by observing rewards, penalties, success, failure, and effort.

Read how Grokking AI Algorithms, Second Edition explains trial and error →

Evolutionary Deep Learning: Genetic algorithms and neural networks

Trial-and-error learning is a strategy that discovers effective actions by repeatedly testing alternatives and retaining those that produce favorable outcomes.

How it is used
Uses repeated environment interaction to solve reinforcement-learning problems when correct actions are discovered through rewards.
How deep it goes
Explains states, actions, rewards, exploration, Q-values, and training loops, but stops short of advanced planning mechanisms.
Examples
Demonstrates a Frozen Lake grid, Q-table, epsilon-greedy action selection, training episodes, and agent exercises.
What you can do after
Apply it via OpenAI Gym by building, training, and exercising a Q-learning agent in a discrete environment.

Read how Evolutionary Deep Learning: Genetic algorithms and neural networks explains trial and error →

Related concepts

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.