下面本质是一个动力学差分方程,也可以说是状态机 ```dart @freezed sealed class S with _$S { const factory S.s0() = S0; const factory S.s1() = S1; } @freezed sealed class A with _$A { const factory A.a0() = A0; const factory A.a1() = A1; } @CmsGraph() class M extends Cms<S, A> { M() : super(.s0()); // dart format off @override Future<S?> kernel(S s, A a) async => switch ((s, a)) { (S0 _, A0 _) => () { if (Random().nextBool()) return S.s1(); return S.s1(); }(), (S1 _, A1 _) => .s0(), _ => undefined(s, a), }; // dart format on } ``` 我想对其积分,看到其演化。通过 `@CmsGraph()` 来做到 [xstate](https://github.com/statelyai/xstate) 画出了图像
Activity
dzylikecode commentedon Dec 24, 2025
后续可以,做动力学分析,或者强化学习
dzylikecode commentedon Dec 24, 2025
后面交互可以考虑动画
mermaid animate arrow
dzylikecode commentedon Jan 7, 2026
可以参考
vscode-debug-visualizer
dzylikecode commentedon Jan 9, 2026
https://thepalindrome.org/p/matrices-and-graphs
这个正是我想的,不过没有深入理解图的结构和矩阵的结构的对应关系
dzylikecode commentedon Jan 9, 2026
https://www.youtube.com/watch?v=PB-1_JTHyEU
dzylikecode commentedon Jan 24, 2026
有些结构其实就是矩阵的分块,比如
fetch_1, fetch_2, 也就是分块矩阵,相当于是子图