Skip to content

[Appliance Core] Build async Q-Learning inference/learning loop with MQTT reporting #29

@saviornt

Description

@saviornt

Description

Create the main asynchronous event loop for the edge Q-Learning agent: observe state → select action → (dummy) execute → store transition → periodic learning → publish episode stats via MQTT.

Why: This is the heart of the edge autonomy — must be non-blocking and observable.

Type

  • Feature

Focus Area (pick one)

  • Appliance Core (Pi edge) / MQTT & Comms

Priority

  • Critical

Acceptance Criteria

  • Async loop using asyncio that runs indefinitely (with graceful shutdown)
  • Publishes episode summaries to MQTT (e.g. network-chan/edge/qlearn/stats)
  • Integrates shared replay, agent, and safety stubs
  • Logs key metrics (epsilon, avg reward, steps)
  • No blocking I/O in the main loop
  • Uses paho-mqtt async client

Blocker / Dependencies

  • [Appliance Core] Implement dummy environment & basic Q-Learning agent

Notes / Links

  • Later: replace dummy observe/execute with real telemetry/Netmiko

Metadata

Metadata

Assignees

Labels

needs-triageNew issue that hasn't been reviewed/prioritized yettaskGeneral work item (implementation, setup, cleanup) – most common label

Projects

Status

Manual QA Testing

Relationships

None yet

Development

No branches or pull requests

Issue actions