make_move_gate¶
- jaxrens.constraints.base.make_move_gate(descriptors, mutates)[source]¶
Build the constraint gate for a single move type.
Selects the descriptors whose
depends_onintersects this move’smutatesset — i.e. the constraints the move could actually violate — instantiates their predicates once, and returns a combined gate.- Parameters:
descriptors (tuple[ConstraintDescriptor, ...]) – All registered gate constraints.
mutates (frozenset[str]) – State aspects this move type writes.
- Returns:
Nonewhen no registered constraint depends on an aspect this move mutates (the caller then uses its no-op fast path), otherwise a function(positions, types, cell) -> (ok, reject_reason)whereokis a scalar bool (all constraints satisfied) andreject_reasonis the int32 bucket of the first violated constraint (0 whenok).- Return type: