Policy
A policy is a rule, principle, or decision function that governs behavior or determines actions or permissions under specified conditions.
Authorization in Action
An authorization policy is a declarative rule or set of rules that determines which subjects may perform which actions on which resources under specified conditions.
- How it is used
- Uses policies to express access requirements separately from application code and support runtime authorization decisions.
- How deep it goes
- Explains policy structure, evaluation, architecture, and governance, then works through Cedar implementations without serving as a comprehensive language guide.
- Examples
- Illustrates policies with time-limited team-report access and document permissions based on ownership, team membership, and management relationships.
- What you can do after
- Apply it via Cedar to express and test document-access rules using scopes, conditions, relationships, and schemas.
Applied Reinforcement Learning
A policy is a decision rule, possibly probabilistic, that assigns actions or action probabilities to states for an agent.
- How it is used
- Guides sequential business decisions toward long-term reward under changing conditions.
- How deep it goes
- Explains deterministic and stochastic policies, then works through iterative evaluation and improvement for resource allocation.
- Examples
- Illustrates policies with retail inventory, project resource allocation, and language-model token selection.
- What you can do after
- Builds and evaluates a resource-allocation policy from scratch using dynamic programming.
ASP.NET Core in Action, 3e
An authorization policy is a named set of requirements that determines whether an authenticated subject may access a protected resource or operation.
- How it is used
- Controls access to Razor Pages, MVC actions, and minimal API endpoints using named authorization requirements.
- How deep it goes
- Explains policy registration and evaluation, then implements custom requirements and handlers, including alternative success paths and explicit failure.
- Examples
- Uses airport security and lounge access rules, plus a recipe-management policy evaluated against a loaded recipe.
- What you can do after
- Apply it via ASP.NET Core authorization services to protect endpoints and evaluate access to specific resources.
Optimization Algorithms: AI techniques for design, planning, and control problems
A policy is a reinforcement-learning decision rule that maps observed states or observations to actions or action probabilities.
- How it is used
- Uses policies to select sequential actions that maximize expected cumulative reward, including in combinatorial optimization.
- How deep it goes
- Defines deterministic and stochastic policies and works through actor-critic training, from action probabilities and advantage estimates to evaluation.
- Examples
- Uses CartPole balancing and a self-driving car’s traffic-merging decisions to illustrate learned policies.
- What you can do after
- Apply it via Stable Baselines3 to train and evaluate an A2C policy for CartPole.
AI Model Evaluation
A decision rule that maps a context to an action or a probability distribution over actions.
- How it is used
- Uses policies as decision strategies to compare before exposing users to a change.
- How deep it goes
- Defines policy and policy value, then walks through logging, probability weighting, comparison, and reliability checks.
- Examples
- Illustrates a movie policy that scores ratings and preferred genres, alongside a weighted recommendation comparison.
- What you can do after
- Evaluate a candidate policy against a baseline using logged outcomes while recognizing when the estimate is unreliable.
Fundamentals of Cybersecurity
A policy is an authoritative organizational statement that establishes required principles, rules, or behaviors.
- How it is used
- Sets mandatory internal security expectations that align decisions and employee behavior with business needs, risks, and external requirements.
- How deep it goes
- Defines high-level management intent and explains policy audiences and approval, then illustrates how requirements become technical controls.
- Examples
- Uses acceptable use, access control, and password policies, including password rules enforced through system-hardening controls.
- What you can do after
- Evaluate/understand it by distinguishing a mandatory internal rule from a procedure or guideline and identifying controls needed to enforce it.
Build a Robo-Advisor with Python (From Scratch)
A policy is a rule or mapping that specifies which action an agent should take for each state.
- How it is used
- Guides goals-based investment actions by mapping wealth and time states to stock-bond allocations.
- How deep it goes
- Works through dynamic-programming and Q-learning policy construction, including value functions, state-action values, updates, and simulated episodes.
- Examples
- Uses a $1 million, 10-year wealth-doubling goal and good, medium, and bad wealth paths to compare allocations.
- What you can do after
- Build it from scratch by computing state-dependent asset allocations with dynamic programming or learning them through Q-learning episodes.
Read how Build a Robo-Advisor with Python (From Scratch) explains policy →
Build a DeepSeek Model (From Scratch)
A policy is a decision rule that assigns action probabilities or actions to situations encountered by a reinforcement-learning agent.
- How it is used
- Uses the policy as the trainable decision rule for reward-driven language-model post-training.
- How deep it goes
- Develops a policy-gradient update and clipped GRPO training skeleton, while leaving generation, scoring, masking, and distributed infrastructure for a real trainer.
- Examples
- Illustrates the policy with a cleaning robot and sampled language-model completions scored by a math-answer verifier.
- What you can do after
- Apply it via a PyTorch GRPO training skeleton, identifying where rollout generation and token scoring must be implemented.
Read how Build a DeepSeek Model (From Scratch) explains policy →
Reinforcement Learning from Human Feedback
A policy is a function that maps an environment state to a probability distribution over actions.
- How it is used
- Frames action selection and optimization in reinforcement learning and language-model RLHF.
- How deep it goes
- Defines policies and trajectory objectives, then interprets parameterized policy-gradient updates and their action-probability effects.
- Examples
- Illustrates learned action rules with a thermostat and CartPole, and maps language-model prompts and completions to states and actions.
- What you can do after
- Evaluate/understand how policy choices shape trajectories and how gradient updates change action probabilities.
Read how Reinforcement Learning from Human Feedback explains policy →
AI Governance
A set of conditions governing an agent’s actions according to its state and context.
- How it is used
- Sets approval boundaries for AI uses and governs agent actions at runtime.
- How deep it goes
- Explains conditional action rules and review triggers, stopping short of a policy-engine implementation.
- Examples
- Uses a patient-assistance agent to illustrate destination restrictions, chart access, emergency escalation, and break-glass review.
- What you can do after
- Evaluate/understand how action context changes risk and when policy conditions call for human review.
Causal AI
A policy is a rule or mapping that selects an action from observed variables, potentially through a stochastic process.
- How it is used
- Deploys observed state or history to select actions in automated decision-making, bandits, reinforcement learning, and causal interventions.
- How deep it goes
- Defines policy notation, stochastic intervention semantics, sequential histories, DAG changes, confounding, and MDP implementation challenges.
- Examples
- Uses randomized interventions, portfolio allocation, game-playing agents, bandit feedback, and history-based pain-medication dosing.
- What you can do after
- Evaluate and compare policies using utility, counterfactual outcomes, regret, causal graphs, and confounding adjustments.
Google Anthos in Action
A policy is a declarative rule that specifies required behavior, configuration, or access conditions for managed resources.
- How it is used
- Controls workload access, secure communication, and permitted Kubernetes configurations across service meshes and managed clusters.
- How deep it goes
- Explains policy purposes, enforcement locations, supported traffic types, security risks, and cluster scope, but does not show policy manifests.
- Examples
- Uses Istio authorization rules, ACM mTLS policies, Gatekeeper controls, and risky Kubernetes manifest fields as concrete policy cases.
- What you can do after
- Operate policy controls to restrict service traffic, secure cluster communication, and prevent dangerous workload configurations.
Microsoft Azure in Action
An access policy is a defined set of rules that determines whether a user or group may access a service or resource.
- How it is used
- Uses rules to control access to Azure services and data, including enforcing MFA for selected users or groups.
- How deep it goes
- Defines policy structure and demonstrates MFA configuration, while deferring detailed authentication grants.
- Examples
- Demonstrates an MFA policy for Alpaca-Ma-Bags using an Entra ID user group and an MFA access grant.
- What you can do after
- Configure an Entra ID conditional access policy that requires MFA from selected users or groups.
Terraform in Depth: Infrastructure as Code with Terraform and OpenTofu
A policy is a rule set that governs technical, compliance, financial, or contractual decisions about infrastructure and software.
- How it is used
- Uses policies to grant IAM permissions and enforce technical, compliance, financial, or contractual decisions in infrastructure code.
- How deep it goes
- Explains IAM role wiring and walks through a Rego naming rule, while directing readers to plugin documentation for fuller policy construction.
- Examples
- Uses GP3 versus GP2 storage and a required S3 bucket-name prefix to illustrate enforceable decisions.
- What you can do after
- Apply it via TFLint’s OPA plugin to flag a naming violation, or diagnose Checkov findings and document intentional exceptions.
Read how Terraform in Depth: Infrastructure as Code with Terraform and OpenTofu explains policy →
.NET in Action, Second Edition
An authorization policy is a set of access-control rules composed of requirements that determine whether an authenticated principal may perform an action.
- How it is used
- Restricts API actions by applying named requirements to authenticated principals.
- How deep it goes
- Defines policies, schemes, requirements, handlers, and claim checks, but stops short of broader policy design.
- Examples
- Uses AuthenticatedUsers and OnlyMe policies on catalog read and mutation actions, with a preferred_username claim check.
- What you can do after
- Build it from scratch by registering named ASP.NET Core policies and handlers, then applying them to controller actions.
Bayesian Optimization in Action
A policy is a decision rule that determines an action from the information available to an optimization procedure.
- How it is used
- Guides action selection in optimization-under-uncertainty problems with limited trials and uncertain rewards.
- How deep it goes
- Defines the decision rule through slot-machine choices and explains its exploration–exploitation tradeoff.
- Examples
- Uses rows of slot machines, unknown reward probabilities, limited pulls, and coin rewards as concrete examples.
- What you can do after
- Apply it to choose actions that maximize cumulative reward while balancing exploration and exploitation.
Building Web APIs with ASP.NET Core
An authorization policy is a named set of requirements that determines whether an authenticated principal may perform an operation.
- How it is used
- Uses named requirements to authorize operations when role checks alone cannot express the needed claim conditions.
- How deep it goes
- Shows policy registration, endpoint application, claim combinations, and assertion logic, while deferring full implementation of the example.
- Examples
- Demonstrates ModeratorWithMobilePhone and MinAge18 policies using claims, roles, and assertion-based date checks.
- What you can do after
- Apply named policies through Program.cs registration and the Authorize attribute.
Read how Building Web APIs with ASP.NET Core explains policy →
Robotics for Programmers
A policy is a mapping from observations or states to actions that specifies an agent's behavior.
- How it is used
- Uses learned behavior to control robots within reinforcement-learning and simulation workflows.
- How deep it goes
- Defines the observation-to-action mapping and connects it to reward maximization and simulation-to-real transfer.
- Examples
- Uses an agent interacting with an environment and a policy trained in simulation before real-robot deployment.
- What you can do after
- Operate a robot in target scenarios by applying a learned policy to its observations or states.
Transformers in Action
A policy is a model or probability distribution that determines the actions or responses produced in a decision-making process.
- How it is used
- Uses policy to select actions in MDPs and to steer language-model outputs toward human preferences.
- How deep it goes
- Defines state-based action selection, then contrasts reward-model optimization with DPO’s direct policy adjustment and KL-divergence constraint.
- Examples
- Uses a dog obstacle course, portfolio construction, preferred-response labels, and direct language-model preference optimization.
- What you can do after
- Understand how policies select actions and how DPO favors preferred language-model responses without an explicit reward model.
Grokking Bayes
A policy is a rule or strategy that selects actions based on the available information or state of a decision problem.
- How it is used
- Guides choices among actions when outcomes, costs, and future information are uncertain.
- How deep it goes
- Explains one-step expected utility and multistep utility propagation through search trees, without implementation code.
- Examples
- Uses government training policies, costs, possible effects, probabilities, and restaurant choices to illustrate sequential decisions.
- What you can do after
- Evaluate policy alternatives by calculating expected utility and selecting adaptive follow-up actions in a decision tree.
Timeless Algorithms, The Foundational Ideas
A policy is a rule that specifies how decisions are selected as a process moves through stages or states.
- How it is used
- Selects an action in each state to maximize expected cumulative reward.
- How deep it goes
- Defines optimal policy through state values, immediate rewards, discounted future values, and action maximization.
- What you can do after
- Understand how state values determine an action that maximizes expected cumulative reward.
Read how Timeless Algorithms, The Foundational Ideas explains policy →
Also covered in
- Infrastructure as Code, Patterns and Practices: With examples in Python and Terraform
- Experimentation for Engineers
- LLM Evaluation and Alignment, The Foundational IdeasIn early access (MEAP)
- Pro ASP.NET Core 7, Tenth Edition
- Architecture Modernization: Socio-technical alignment of software, strategy, and structure
- Think Like a CTO
- Digital Twins in Action
- Grokking AI Algorithms, Second Edition
- Data-Driven Cybersecurity
- Designing AI AgentsIn early access (MEAP)
- The Complete Obsolete Guide to Generative AI
- AI for Everyday IT
What to know first
- reinforcement learningReinforcement learning is a machine-learning paradigm in which an agent learns behavior or a decision policy through interaction with an environment and evaluative feedback, such as rewards.
- language modelA language model is a computational model that represents patterns in linguistic sequences to assign probabilities, predict, generate, or evaluate language.
- actionAn action is a choice or operation selected or performed by an actor that can affect a system, environment, or process.
- 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.
Related concepts
- attributeuses · An attribute is a named property or piece of information associated with an entity, object, or structured data item.
- attribute-based access controlused by · Attribute-based access control is an authorization model that evaluates subject, resource, action, and contextual attributes against policies to make access decisions.
- multi-armed banditincludes · A multi-armed bandit is a sequential decision problem in which an agent repeatedly chooses among alternatives with uncertain rewards, balancing reward seeking with information gathering.
- behavior policyincludes · A behavior policy is the policy that selects actions and generates experience for a learning algorithm.
- cache placement policyincludes · A cache placement policy is a rule that determines where a fetched memory block is stored in a cache.
- commit policyincludes · A commit policy is a set of automated rules evaluated against new commits to accept or reject them according to project requirements.
Questions about policy
What is policy?
A policy is a rule, principle, or decision function that governs behavior or determines actions or permissions under specified conditions.
Which Manning books explain policy?
Authorization in Action, Applied Reinforcement Learning, ASP.NET Core in Action, 3e, Optimization Algorithms: AI techniques for design, planning, and control problems, AI Model Evaluation, Fundamentals of Cybersecurity, Build a Robo-Advisor with Python (From Scratch), Build a DeepSeek Model (From Scratch) and 13 more.
What should I know before learning policy?
Manning books that teach policy usually introduce reinforcement learning, language model, action and state first.
What kinds of policy are there?
Kinds of policy include multi-armed bandit, behavior policy, cache placement policy and commit policy.
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.




















