Skip to content

Justin dev#29

Merged
justinmadison merged 3 commits intomainfrom
JustinDev
Nov 29, 2025
Merged

Justin dev#29
justinmadison merged 3 commits intomainfrom
JustinDev

Conversation

@justinmadison
Copy link
Member

Description

Brief description of what this PR does.

Closes #(issue number)

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Performance improvement
  • Code refactoring
  • Tests
  • Build/CI changes

Changes Made

  • List key changes
  • One per line
  • Be specific

Testing

  • Tests pass locally (pytest tests/)
  • Added new tests for new features
  • Tested manually (describe below)
  • No regressions in existing functionality

Manual Testing:
Describe how you tested this change manually.

Performance Impact

  • No performance impact
  • Improves performance
  • May impact performance (explain below)

Documentation

  • Updated relevant documentation
  • Added code comments for complex logic
  • Updated CHANGELOG (if applicable)
  • Added/updated docstrings

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Screenshots (if applicable)

Add screenshots to help reviewers understand your changes.

Additional Notes

Any additional information reviewers should know.

@justinmadison
Copy link
Member Author

Add end-to-end pipeline test validating game observations → Python backend
→ mock AI decisions → game response flow.

Backend changes:

  • Add /observe POST endpoint to python/ipc/server.py
  • Implement _make_mock_decision() with priority-based logic:
    1. Avoid hazards (distance < 3.0) using move_to
    2. Collect resources (distance < 5.0) using move_to
    3. Default to idle when no actions available
  • Add total_observations_processed metric
  • Fix: Use move_to instead of non-existent move_away tool

Frontend changes:

  • Add scripts/tests/test_observation_loop.gd test script
  • Add scenes/tests/test_observation_loop.tscn test scene
  • Implement mock foraging environment with 4 resources and 2 hazards
  • Add resource collection simulation (COLLECTION_RADIUS = 2.0)
  • Add position simulation (2 units/tick movement)
  • Dynamic observation updates (exclude collected resources)

Documentation:

  • Add python/OBSERVE_ENDPOINT.md - API documentation
  • Add TESTING_OBSERVATION_LOOP.md - Complete testing guide
  • Update scenes/tests/README.md with new test

Testing:

  • Add python/test_observe_endpoint.py validation script
  • Verified full 10-tick loop executes successfully
  • Confirmed hazard avoidance, resource collection, and idle behavior

Closes #28"

@justinmadison justinmadison merged commit 2f6e23f into main Nov 29, 2025
0 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments