liveBook · Manning

Cognitive component

As explained in Grokking AI Algorithms, Second Edition

The cognitive constant is a positive particle-swarm parameter below two that controls the influence of a particle's personal best position on its movement.

The cognitive component is a positive particle-swarm parameter below two. It controls how strongly a particle is pulled toward its own personal best position, encouraging independent exploration instead of blindly following the swarm. section 7.8

The constant changes the swarm’s behavior:

  • High cognitive and low social settings make particles “nostalgic loners” that spread out and revisit their own discoveries. section 7.8
  • Low cognitive and high social settings make particles follow the current leader and converge quickly, possibly on a local optimum. section 7.8

Pulling a particle toward its best position

The cognitive acceleration is calculated from the cognitive constant and a random factor, then multiplied by the difference between the particle’s personal-best and current coordinates. That result contributes to the updated velocity.

How Grokking AI Algorithms, Second Edition covers it

How deep it goes
Defines the parameter, contrasts settings, and shows its coordinate-level Python calculation without deriving the full update formula.
Examples
Uses loner and trend-follower swarm analogies plus a Python calculation based on personal-best and current coordinates.
What it assumes
Assumes particle positions and personal-best positions, while introducing the cognitive, inertia, and social components together.
What you can do after
Apply it via Python by calculating personal-best attraction as part of each particle’s updated velocity.
How it connects
Connects personal best position, velocity, inertia, social component, exploration, exploitation, and local optima.

Also explained in

Compare how 2 books explain cognitive component →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking AI Algorithms, Second Edition. The section links point to the parts of the book it draws on.