Grand Diomande Research · Full HTML Reader

Motion Language Examples

**Features:** - 2D trajectory plots with time-coded coloring - 3D latent space visualization (X, Y, Commitment) - Anticipation signal plots (commitment, uncertainty, transition pressure)

Embodied Trajectory Systems research note experiment writeup candidate score 36 .md

Full Public Reader

Motion Language Examples

Proof-of-concept implementations demonstrating motion-to-semantic-meaning translation.

Examples

1. Latent Trajectory Visualization

File: `latent_trajectory_viz.py`

Visualizes how different gestures trace characteristic paths through the latent embedding space.

bash
# Show all gesture trajectories
python latent_trajectory_viz.py --show

# Save specific gesture visualization
python latent_trajectory_viz.py --gesture swipe_left --output swipe.png

# Generate comparison figure
python latent_trajectory_viz.py --output all_gestures.png

Features:
- 2D trajectory plots with time-coded coloring
- 3D latent space visualization (X, Y, Commitment)
- Anticipation signal plots (commitment, uncertainty, transition pressure)

2. Gesture Pattern Clustering

File: `gesture_clustering.py`

Demonstrates clustering of gesture embeddings to validate the taxonomy from GESTURE_LEXICON.md.

bash
# Run clustering analysis with default settings
python gesture_clustering.py --show

# Generate more samples for robust statistics
python gesture_clustering.py --n-samples 100 --output clusters.png

# Adjust noise level for sensitivity analysis
python gesture_clustering.py --noise 0.1 --show

Output:
- Silhouette scores for each clustering method
- Adjusted Rand Index (ARI) comparing to ground truth
- Cluster purity metrics
- Visual comparison of clustering results

3. Intent Classification Demo

File: `intent_classification.py`

Complete pipeline demonstration: motion signals → gestures → intents.

bash
# Run standard demo
python intent_classification.py

# Interactive mode (future)
python intent_classification.py --demo interactive

Pipeline stages:
1. Motion Signals — Simulated anticipation packets
2. Gesture Classification — Rule-based pattern matching
3. Intent Inference — Grammar-based sequence matching

Dependencies

bash
# Core
pip install numpy matplotlib scikit-learn

# Optional (for enhanced visualizations)
pip install umap-learn seaborn

Integration with Comp-Core

These examples use simulated data for demonstration. For real integration:

Using cc-anticipation (Python bindings)

python
from cc_anticipation import AnticipationKernel, AnticipationConfig, MotionWindow

# Create kernel
config = AnticipationConfig.default()
kernel = AnticipationKernel(config)

# Process real motion data
window = MotionWindow.from_frames(skeleton_frames)
packet = kernel.process(window)

# Use packet in our examples
from intent_classification import GestureClassifier
classifier = GestureClassifier()
gesture = classifier.process(packet)

Using cc-gesture (Rust)

rust
use cc_gesture::{GestureClassifier, AnticipationData, NeighborMatch};

// Create classifier
let mut classifier = GestureClassifier::default_config();

// Classify from real anticipation data
let data = AnticipationData::new(
    packet.commitment,
    packet.uncertainty,
    packet.transition_pressure,
    packet.regime_embedding.to_vec()
);

if let Some(gesture) = classifier.classify(&data, &neighbors) {
    println!("Detected: {}", gesture.label.name);
}

File Structure

examples/
├── README.md                    # This file
├── latent_trajectory_viz.py     # Trajectory visualization
├── gesture_clustering.py        # Clustering analysis
└── intent_classification.py     # Full pipeline demo

References

  • [MOTION_SEMANTICS.md](../MOTION_SEMANTICS.md) — Theoretical framework
  • [GESTURE_LEXICON.md](../GESTURE_LEXICON.md) — Gesture catalog
  • [cc-anticipation](../../../core/motion/cc-anticipation/) — Rust anticipation kernel
  • [cc-gesture](../../../core/motion/cc-gesture/) — Rust gesture classifier

Promotion Decision

Attach run IDs, datasets, metrics, and reproduction commands.

Source Anchor

Comp-Core/docs/motion-language/examples/README.md

Detected Structure

Method · Evaluation · References · Figures · Code Anchors · Architecture