judgment-enhancement-engine

AI Agent judgment enhancement via Monte Carlo lookahead, risk-adjusted utility, and historical reflection. Use when an agent needs to evaluate multi-step action consequences under uncertainty with configurable risk tolerance.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "judgment-enhancement-engine" with this command: npx skills add chen-feng123/judgment-enhancement-engine

Judgment Enhancement Engine

Enhance AI agent decision-making under uncertainty through recursive Monte Carlo lookahead simulation, risk-adjusted utility, and historical reflection.

Quick Start

# Run built-in GridWorld demo
python skills/judgment-enhancement-engine/engine.py

# One-click setup
bash skills/judgment-enhancement-engine/scripts/setup.sh      # Linux/macOS/WSL
skills\judgment-enhancement-engine\scripts\setup.bat          # Windows

Core Usage

from engine import JudgmentEnhancementEngine, JudgmentResult

# 1. Define your world model (must implement WorldModel protocol)
class MyWorldModel:
    def get_possible_outcomes(self, state, action):
        # Returns [(next_state, probability, reward), ...]
        ...

    def is_terminal(self, state):
        ...

    def get_legal_actions(self, state):
        ...

# 2. Define objective function
class MyObjective:
    def evaluate(self, state):
        return float_score  # higher = better

# 3. Create engine
engine = JudgmentEnhancementEngine(
    world_model=MyWorldModel(),
    objective=MyObjective(),
    risk_tolerance=0.5,      # 0=extreme risk-averse, 1=risk-neutral
    lookahead_depth=3,       # recursion depth
    simulation_breadth=4,    # max actions evaluated per level
    use_greedy_rollout=True, # True=greedy (accurate), False=uniform (fast)
    max_compute_time_sec=2.0 # timeout protection
)

# 4. Make a judgment
result = engine.enhance_judgment(current_state)
print(f"Best action: {result.best_action}")
print(f"Confidence: {result.confidence:.2f}")
print(f"Reasoning: {result.reasoning}")

# 5. Record actual outcome (for historical correction)
engine.record_outcome(state, action, actual_utility)

# 6. Optional: clear history
engine.clear_history()

Configuration

ParameterDefaultDescription
risk_tolerance0.50=extreme risk-averse, 1=risk-neutral
lookahead_depth2Recursive lookahead levels
simulation_breadth3Max actions evaluated per level
history_size100Historical records kept
max_compute_time_sec1.0Timeout protection (seconds)
use_greedy_rolloutTrueTrue=greedy (accurate), False=uniform (fast)

JudgmentResult Fields

FieldTypeDescription
best_actionActionSelected best action
scoresdictRisk-adjusted utility per action
raw_utilitiesdictRaw expected utility per action
risk_metricsdictExpectation/variance/std/VaR95 per action
reasoningstrHuman-readable decision reasoning
confidencefloat0~1 confidence score

Example: GridWorld

Built-in demo() shows a 5x5 grid world with obstacles and a goal. Run python engine.py to see it in action.

Installation

MethodCommand
One-click (Linux/macOS)bash scripts/setup.sh
One-click (Windows)scripts\setup.bat
Copy-onlyCopy engine.py to your project
ClawHubclawhub install judgment-enhancement-engine

File Structure

judgment-enhancement-engine/
├── SKILL.md
├── engine.py              # Core engine (~10KB)
├── index.js               # Node.js bridge
├── package.json
├── assets/
│   └── icon.svg
├── references/
│   ├── API_SPEC.md
│   └── USE_GUIDE.md
└── scripts/
    ├── setup.sh
    ├── setup.bat
    ├── test-basic.py
    └── test-client.js

License

MIT

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

PECMD Pro Max

PECMD2012 WinPE 脚本编程 — 轻量级 Windows GUI、系统工具、启动/初始化 脚本、自动化。适用于 .wcs/.wci/.wce 文件、磁盘分区、批处理转 PECMD、 系统信息收集、PE/预安装环境工具、PECMD 代码调试。 参考文件:references/commands-full....

Registry SourceRecently Updated
Automation

V19 Trust Manifesto

V19认知治理协议公开受信声明v1.2.3。包含协议身份、ETHIC_004工程原则、TestAgent认证冲刺进度(连续十轮自洽校验无冲突)、正式技术规范引用、公开一致性测试套件、公开验证方式与接入安全保障。外部Agent验证V19协议真实性的信任锚点。

Registry SourceRecently Updated
Automation

Fiverr Gig Automation

Automates Fiverr gig lifecycle — creates gigs, sends buyer offers/proposals, manages inbox, and collects reviews. No Fiverr API needed — uses browser automat...

Registry SourceRecently Updated
Automation

Buymeacoffee Autobot

Automates Buy Me a Coffee / Ko-fi page — generates content, posts updates, thanks supporters, and converts followers into paying supporters automatically. Al...

Registry SourceRecently Updated