Port PebbleGame3D to solver/datagen/pebble_game.py #2
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Move
PebbleGame3Dclass fromdata/synthetic/pebble-game.py(L130-367) intosolver/datagen/pebble_game.py.Class overview
The (6,6)-pebble game tests Tay sparsity conditions incrementally for 3D body-bar-hinge rigidity. Each vertex (rigid body) starts with K=6 pebbles. To insert an edge, L+1=7 pebbles must be collected on its two endpoints. If successful, the edge is independent; otherwise redundant.
Methods to port
__init__— initializesPebbleState, edge counter, body setadd_body(body_id)— registers body with 6 free pebblesadd_joint(joint)— expands joint to multigraph edges, tests each_try_insert_edge(edge_id, u, v)— core pebble collection + edge acceptance_search_and_collect(target, forbidden)— DFS to find/move free pebbles_reverse_path(edge_ids, pebble_source)— reverses directed edges along pathget_dof(),get_internal_dof(),is_rigid(),get_redundant_count()classify_assembly(grounded)— returns well-constrained/under/over/mixedRequirements
solver.datagen.types(JointType, Joint, PebbleState)__all__ = ["PebbleGame3D"]Depends on