Skip to content

Encoder Module Prompts #9

@sdley

Description

@sdley

Place in src/encoders/ for shared graph-based state representations.

  • Implement GAT encoder in encoders/gat_encoder.py per Reinforce-model-Paper.pdf Section V-A1. Input: node feats (coords, demands, types), edge dists. Embed to dx-dim, L GAT layers with edge-aware attention: alpha_ij = LeakyReLU(LeakyReLU(W[x_i||x_j||e_ij])). Aggregate neighbors, output node embeds + graph embed (mean pool). PyTorch Geometric. Configurable layers/heads. Test on synthetic EVRP instance from env.

  • Add simple MLP encoder baseline in encoders/mlp_encoder.py. Embed nodes independently (coords/demands/types), pool to graph embed. Compare to GAT in docstring. Make abstract Encoder base class with forward(graph) -> embeds.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

Status

In review

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions