Strategy Pattern
Version 1.0.0 · Updated 2026-07-28
CORE DEFINITION
In computer programming, the strategy pattern (also known as the policy pattern) is a behavioral software design pattern that enables selecting an algorithm at runtime. Instead of implementing a single algorithm directly, the code receives runtime instructions on which of a family of algorithms to use.
SCAFFOLDING EFFECT
Reduce cognitive load
In computer programming, the strategy pattern (also known as the policy pattern) is a behavioral software design pattern that enables selecting an algorithm at runtime. Instead of implementing a single algorithm directly, the code receives runtime instructions on which of a family of algorithms to use.
Anchor fast decisions
Refers to a type of behavioral pattern in Design Patterns that encapsulates interchangeable algorithms/strategies, allowing the caller to select different behaviors at runtime.
MINIMUM ACTION
In progress 0/4Practice this model in one real situation:
account_treeGenealogyexpand_more
menu_bookReferencesexpand_more
Source support: Explicit
- zh.wikipedia.orghttps://zh.wikipedia.org/wiki/%E7%AD%96%E7%95%A5%E6%A8%A1%E5%BC%8Fverified
PRIVATE NOTES · Only visible to you
SAVED Q&A
ENTRY Q&A · Private saving available
Ask with a clear boundary
thinkingmodels answers from published entry context only.
Your question is sent to thinkingmodels. The answer uses public entry context only.
RELATED MODELS