Heuristic
A heuristic is a practical rule or approximate method for guiding judgment, search, or problem solving without guaranteeing an exact or optimal result.
Collaborative Software Design: How to facilitate domain modeling decisions
A mental shortcut is a rapid cognitive strategy that reduces the effort required to interpret situations and make decisions.
- How it is used
- Guides facilitators and groups toward timely design and process decisions during collaborative modeling.
- How deep it goes
- Defines experience-based quick rules, demonstrates competing tradeoffs, and gives journaling practices without formal decision-analysis internals.
- Examples
- Uses grocery shopping, emergency-room triage, EventStorming groups, and BigScreen boundary design.
- What you can do after
- Apply heuristics to facilitate sessions, make design choices, resolve competing priorities, and grow a reflective toolkit.
Advanced Algorithms and Data Structures
A heuristic is a problem-solving method that seeks a good or approximate solution without guaranteeing the optimum.
- How it is used
- Uses heuristics to make practical choices in tree insertion, search, routing, and optimization when exhaustive decisions may be costly.
- How deep it goes
- Develops concrete selection and random-sampling procedures, including failure cases and costs, but leaves the shop-comparison heuristic unspecified.
- Examples
- Illustrates choices with overlapping SS-tree leaves, eligible shops, route estimates, and randomly sampled graph embeddings.
- What you can do after
- Apply it via branch-selection and sampling rules, while checking whether faster decisions justify possible loss of solution quality.
Read how Advanced Algorithms and Data Structures explains heuristic →
Grokking AI Algorithms, Second Edition
A heuristic is a problem-specific rule or set of rules that evaluates states or solutions to guide search when no clear method for finding an optimal solution is available.
- How it is used
- Guides informed search with problem-specific rules for evaluating states.
- How deep it goes
- Defines heuristics and explains their scoring roles through search steps, cost calculations, and a Python implementation.
- Examples
- Uses road routing, a Manhattan-distance maze, and game-state scoring to illustrate heuristic choices.
- What you can do after
- Evaluate and understand heuristic choices and their effects on guided search.
Read how Grokking AI Algorithms, Second Edition explains heuristic →
Optimization Algorithms: AI techniques for design, planning, and control problems
A problem-solving rule or approximation that guides search toward promising solutions without guaranteeing feasibility or optimality.
- How it is used
- Guides optimization and informed search toward promising solutions or states within practical search time.
- How deep it goes
- Defines heuristic limitations and works through packing rules, search estimates, and probabilistic edge selection.
- Examples
- Uses rectangular bin packing, misplaced tiles in the 8-puzzle, and straight-line distance in route finding.
- What you can do after
- Evaluate heuristic choices by comparing packing results and considering feasibility, solution quality, and search guidance.
Algorithms Every Programmer Should Know
An estimate used to guide choices in a search or optimization problem.
- How it is used
- Guides A* toward a goal with estimated remaining cost and scores local path desirability in ant colony optimization.
- How deep it goes
- Defines cheap estimates, explains admissibility and its shortest-path guarantee, and distinguishes consistency as a stronger property.
- Examples
- Uses straight-line road distance, Manhattan grid distance, sliding-tile displacement, and inverse-distance path desirability.
- What you can do after
- Understand how admissible estimates guide shortest-path search and how local desirability informs probabilistic ant choices.
Read how Algorithms Every Programmer Should Know explains heuristic →
Software Testing with Generative AI
A practical rule or strategy for examining a system from a particular perspective without requiring a complete formal analysis.
- How it is used
- Generates exploratory test ideas and risk questions when direct investigation or formal modeling does not reveal enough possibilities.
- How deep it goes
- Moves from experienced intuition to explicit mnemonic-driven prompts, but retains dependence on personal experience and bias.
- Examples
- Uses PAOLO, SFDIPOT, booking-calendar navigation, overflowing pop-ups, and time-based risk prompts.
- What you can do after
- Apply it via PAOLO or SFDIPOT to generate focused test ideas, risks, and alternative questions about a product or flow.
Read how Software Testing with Generative AI explains heuristic →
Deep Learning with R, Third Edition
A heuristic is a method based on manually specified rules rather than rules learned from data or derived from a formal theory.
- How it is used
- Guides object-region selection and program search through explicit or learned rules.
- How deep it goes
- Defines hard-coded rules, contrasts learned and theory-derived models, and shows replacement by a learned proposal network.
- Examples
- Uses selective search for R-CNN region proposals and learned heuristics for navigating program-generation search.
- What you can do after
- Evaluate whether a pipeline relies on hand-coded rules, learned rules, or theory-derived rules.
Read how Deep Learning with R, Third Edition explains heuristic →
Inside AI
A heuristic is a practical rule or approximation for making decisions when exhaustive computation is impractical.
- How it is used
- Guides game programs in evaluating positions, pruning search, allocating computation time, and selecting moves.
- How deep it goes
- Explains heuristic scoring and time allocation within chess search, while stopping short of formal derivation or implementation detail.
- Examples
- Uses chess programs, Deep Blue, weighted position scores, opening databases, and endgame databases as concrete examples.
- What you can do after
- Evaluate how approximate rules can make large game searches manageable under strict time limits.
Machine Learning Platform Engineering
A heuristic is a rule-based method that produces a practical solution without learning a model from data.
- How it is used
- Guides the initial decision about whether an ML project needs a learned model at all.
- How deep it goes
- Defines the trade-off with ML and stops short of specifying heuristic implementation or evaluation procedures.
- What you can do after
- Evaluate whether a practical rule is sufficient before adopting an ML model.
Read how Machine Learning Platform Engineering explains heuristic →
Architecture Modernization: Socio-technical alignment of software, strategy, and structure
A heuristic is a practical rule or method for guiding problem solving and decision making when an exact solution is unavailable or unnecessary.
- How it is used
- Guides domain-boundary discovery by generating alternative models and making their trade-offs explicit.
- How deep it goes
- Explains competing heuristics, dependency costs, and evolutionary refinement, but stops short of guaranteeing an optimal boundary.
- Examples
- Uses a train-versus-bicycle analogy, EventStorming, pivotal events, semantic boundaries, and dependency-cost analysis.
- What you can do after
- Apply it via EventStorming and Domain Message Flow Modeling to compare boundary options and refine them over time.
AI Model Evaluation
A heuristic is a straightforward rule or procedure that produces an outcome without requiring a machine-learning model.
- How it is used
- Provides a fast, interpretable product solution or baseline before introducing a more complex machine-learning model.
- How deep it goes
- Defines heuristics, explains their trade-offs, and applies contextual offline metrics, but stops short of implementation details.
- Examples
- Uses popularity ranking, alternative business logic, and a streaming app’s recently watched shows as examples.
- What you can do after
- Evaluate a simple product algorithm offline by selecting metrics that match its retrieval or ranking objective.
Designing AI Agents
A practical rule or strategy for proposing a solution without guaranteeing an optimal result.
- How it is used
- Uses failure-derived heuristics as candidates for agent memory, subject to independent admission.
- How deep it goes
- Implements candidate generation and retrieval, while leaving admission to independent evaluation.
- Examples
- Records failure context, error, fix, and candidate lessons, then retrieves similar candidates for review.
- What you can do after
- Evaluate candidate heuristics against admission evidence before allowing them into active recall.
Also covered in
- Build a Reasoning Model (From Scratch)
- Tiny Python Projects: Learn coding and testing with puzzles and games
- Machine Learning System Design
- Causal AI
- Writing for Developers: Blogs that get read
What to know first
- language modelA language model is a computational model that represents patterns in linguistic sequences to assign probabilities, predict, generate, or evaluate language.
- search spaceA search space is the set of possible states, choices, configurations, or candidate solutions that may be considered when exploring or solving a problem.
- shortest pathA shortest path is a path between two nodes or locations that minimizes total distance, length, or cost under a specified measure.
- stakeholderA stakeholder is a person, group, or organization with an interest in, influence over, or potential to be affected by a system, project, decision, or its outcomes.
Related concepts
- A* algorithmused by · A* is an informed graph-search algorithm that prioritizes paths or states by combining the cost incurred so far with a heuristic estimate of the remaining cost to a goal.
- minimax algorithmused by · A game-search algorithm that alternates maximizing an agent's score and minimizing the opponent's score while exploring possible future moves.
- samplingincludes · Sampling is a procedure for selecting items from a collection or generating outcomes from a probability distribution according to a specified rule.
- informed searchused by · Informed search is a search strategy that uses problem-specific knowledge or heuristic estimates to prioritize promising states or paths.
- Manhattan distanceincludes · Manhattan distance is the sum of the absolute differences between corresponding coordinates of two points or vectors.
Questions about heuristic
What is heuristic?
A heuristic is a practical rule or approximate method for guiding judgment, search, or problem solving without guaranteeing an exact or optimal result.
Which Manning books explain heuristic?
Collaborative Software Design: How to facilitate domain modeling decisions, Advanced Algorithms and Data Structures, Grokking AI Algorithms, Second Edition, Optimization Algorithms: AI techniques for design, planning, and control problems, Algorithms Every Programmer Should Know, Software Testing with Generative AI, Deep Learning with R, Third Edition, Inside AI and 4 more.
What should I know before learning heuristic?
Manning books that teach heuristic usually introduce language model, search space, shortest path and stakeholder first.
What kinds of heuristic are there?
Kinds of heuristic include sampling, greedy nearest-neighbor heuristic and Manhattan distance.
What is heuristic also called?
Heuristic is also called Mental shortcuts or rules of thumb.
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.











