-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpolicy.capnp
More file actions
35 lines (29 loc) · 1.12 KB
/
policy.capnp
File metadata and controls
35 lines (29 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
@0xabcdeffedcba9876;
struct Tensor1F64 {
data @0 :List(Float64); # vector de 64-bit floats
}
struct Tensor2F64 {
rows @0 :UInt64; # dimensión 0 (filas)
cols @1 :UInt64; # dimensión 1 (columnas)
data @2 :List(Float64); # row-major (rows*cols)
}
struct PolicyCheckpoint {
version @0 :UInt64; # versión del ckpt
obsDim @1 :UInt64; # dimensión de la observación
hidden @2 :UInt64; # tamaño de la capa oculta
actionCount @3 :UInt64; # cantidad de acciones
# Identidad del contexto de acción φ(a)
phiRows @4 :UInt64; # normalmente = actionCount
phiCols @5 :UInt64; # K de φ(a)
acId @6 :UInt64; # xxh3_64(phiRows, phiCols, bytes(Float64) row-major)
# Pesos principales (Float64) — nombres en minúscula
w1 @7 :Tensor2F64;
b1 @8 :Tensor1F64;
wt @9 :Tensor2F64;
bt @10 :Tensor1F64;
wp @11 :Tensor2F64;
bp @12 :Tensor1F64;
# Cabezal contextual (opcional) — válido solo si hasPa y compatible
hasPa @13 :Bool;
pa @14 :Tensor2F64; # (phiCols, hidden)
}