Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Matrix-Free Micromouse

Matrix-Free Micromouse is a native Windows x64 solver that combines CUDA route search, closed-loop differential-drive dynamics, and a full-vehicle finite-strain generalized Maxwell finite-element model in one offline executable.

The route graph is generated on demand without storing an adjacency matrix. Candidate control strategies are evaluated in parallel, replayed by a motor-battery-tire model, and certified by a three-dimensional continuum model whose deformed wheel radius is returned to the vehicle replay.

Highlights

  • Matrix-free CUDA route graph with 8 heading states per cell.
  • Straight runs F1-F8, 45/90/135-degree turns, diagonal motion, and U-turns.
  • 4,096 parallel strategy candidates with deterministic high-precision replay.
  • Independent left/right tire friction-cone projection.
  • Motor back-EMF, current limiting, battery internal resistance, terminal voltage, and state-of-charge feedback.
  • Seven non-empty deformable vehicle regions connected by 883 interface ties.
  • Fully integrated Hex8 continuum discretization with 39,328 Gauss points.
  • Eight finite-strain Maxwell branches at every material point.
  • CPU/GPU evaluation of the same element residual for numerical cross-checking.
  • 295 public archive records and deterministic regulation-oriented random-maze generation.
  • Native Win32 interface with embedded CUDA PTX and no runtime dependency on the CUDA Toolkit, VC++ Runtime, or .NET.

Solver Pipeline

  1. The CUDA action graph generates neighbors and edge costs directly from maze walls and motion primitives.
  2. A 64 x 64 policy grid evaluates 4,096 speed strategies in parallel.
  3. The native replay evaluates up to 128 ranked candidates with closed-loop motor, battery, tire, and chassis dynamics.
  4. The winning trajectory supplies longitudinal, lateral, and vertical load histories to the full-vehicle finite-element model.
  5. The deformed tire mesh determines the effective wheel radius and wheel inertia.
  6. The same candidate is replayed with the updated wheel properties and certified by a second finite-element pass.

Deterministic two-pass coupling

Full-Vehicle Discretization

Region Structured mesh Nodes Hex8 elements Material card
PCB and chassis 24 x 30 x 2 2,325 1,440 1
Battery 12 x 9 x 2 390 216 2
Left motor 2 x 7 x 5 144 70 3
Right motor 2 x 7 x 5 144 70 3
Sensor board 12 x 4 x 1 130 48 4
Left tire 4 x 64 x 6 periodic ring 2,240 1,536 0
Right tire 4 x 64 x 6 periodic ring 2,240 1,536 0
Total - 7,613 4,916 5 cards

The model has 22,839 displacement degrees of freedom, of which 22,833 are active after six scalar constraints remove rigid-body modes. Every Hex8 element uses 2 x 2 x 2 integration, producing 39,328 Gauss points. All nodes are referenced by at least one element and receive positive mass.

Full-vehicle mesh, top view

Full-vehicle mesh, cross section

Finite-Strain Generalized Maxwell Model

The equilibrium branch uses a compressible total-Lagrangian Neo-Hookean model:

[ F=I+\nabla_Xu,\qquad J=\det F, ]

[ P_\infty=\mu_\infty F+(\lambda\ln J-\mu_\infty)F^{-T}. ]

Eight non-equilibrium branches are driven by the deviatoric Green-Lagrange strain:

[ E=\tfrac12(F^TF-I),\qquad e=\operatorname{dev}E, ]

[ \Gamma_k^{n+1}=\frac{\tau_k}{\tau_k+\Delta t}\Gamma_k^n+ \frac{\Delta t}{\tau_k+\Delta t}e^{n+1}, ]

[ S_k=2\mu_k(e^{n+1}-\Gamma_k^{n+1}),\qquad P=P_\infty+F\sum_{k=1}^{8}S_k. ]

The discrete branch dissipation is evaluated as

[ \mathcal D_k=\frac{2\mu_k}{\tau_k} \lVert e-\Gamma_k\rVert^2\ge0. ]

Each Gauss point stores 8 x 6 symmetric history components, for 1,887,744 material-history scalars. The five deterministic material cards are reference cards for solver regression and parameter studies.

Finite-strain generalized Maxwell material point

Matrix-Free CUDA Execution

The embedded PTX contains six kernels for route relaxation, strategy ranking, nodal load assembly, interface constraints, Hex8 constitutive residuals, and nodal integration.

mm_fem_hex8_force assigns one thread to one element. The thread evaluates eight Gauss points, forms the 24 element residual entries locally, advances 384 branch-history values, and uses floating-point atomics only when scattering nodal forces. No global stiffness or mass matrix is assembled.

The generated LLVM IR is audited before PTX emission. The release gate checks the unique construction of F = I + grad_X(u), the complete 8 x 6 history interface, backward-Euler branch updates, and non-negative dissipation.

Verification

The repository contains native constitutive tests, full physics regression, generated-IR validation, and PE validation.

Gate Result
Undeformed zero residual PASS
Rigid-rotation objectivity PASS
Finite affine stretch PASS
Maxwell stress relaxation PASS
Positive accumulated dissipation PASS
Seven-region mesh and material audit PASS
Public archive layouts 295 / 295
Deterministic random mazes 256 / 256
Strategy grid 4,096 / 4,096
Complex half-size route regression PASS
Reproducible executable build byte-identical

Detailed results are recorded in VERIFICATION.txt. Release integrity and Defender review information are recorded in SECURITY.md and SHA256SUMS.txt.

Build

The canonical Windows executable is generated with Zig/LLD. The build regenerates the finite-element PTX from audited LLVM IR, executes the native tests, embeds resources, finalizes the PE checksum, and runs the static release gate.

ZIG_BIN=/path/to/zig \
ZIG_GLOBAL_CACHE_DIR=/tmp/mm-zig-global \
ZIG_LOCAL_CACHE_DIR=/tmp/mm-zig-local \
./build_portable.sh

The portable executable is distributed separately through GitHub Releases.

Maze Archive

The embedded archive is generated from the public text collection maintained by Micromouse Online. Source provenance and archive interpretation are documented in THIRD_PARTY_MAZE_NOTICE.md.

About

No description, website, or topics provided.

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages