Skip to content
Back to skills

Particle Entropy Reward

ASecurity

Estimate CIC intrinsic reward using k-nearest-neighbor particle entropy over learned transition embeddings.

  • 247 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 9, 2026
ai-agentspythonbash

Works with

  • cli

Security analysis

A100/100

Scanned September 9, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill particle_entropy_reward --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Particle Entropy Reward?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Particle Entropy Reward
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-particle-entropy-reward/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-particle-entropy-reward)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
---
name: particle_entropy_reward
description: Estimate CIC intrinsic reward using k-nearest-neighbor particle entropy over learned transition embeddings.
---

# Particle Entropy Reward

Use this skill when a CIC-style recovery or implementation needs the entropy-based intrinsic reward over state-transition embeddings. Do not use this skill to compute the contrastive loss or downstream task reward.

## Inputs

- `embeddings`: two-dimensional transition embedding matrix.
- `k`: number of nearest neighbors to average, clamped to `batch_size - 1`.
- `epsilon`: positive distance stabilizer before logarithms.

## Outputs

- `rewards`: per-transition intrinsic reward values based on average log nearest-neighbor distances.
- `diagnostics`: min, max, mean reward, effective `k`, and neighbor distances.

## Workflow

1. Validate a batch of at least two embedding vectors.
2. Compute pairwise Euclidean distances.
3. Exclude self-distances from neighbor lists.
4. Select the nearest `k` neighbors for each point.
5. Average `log(distance + epsilon)` as the intrinsic reward.
6. Use reward diagnostics to verify finite, diverse exploration signal.

## Validation

Run:

```bash
python scripts/entropy_reward.py --demo
python tests/test_entropy_reward.py
```

## Limitations

This skill implements the reward estimator only. It does not interact with an RL environment or train a policy.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.