你真的让我的好朋友...
由于已经训练过的神经网络与常规状态机没有太大区别,因此没有必要为确定性指令集编写神经网络 VM。
用多个指令集或未知集训练这样的 VM 可能会很有趣。但是,我怀疑执行这样的训练是否实用,即使是 %99 正确的解释器也对传统字节码有用。
我能想到的神经网络 VM 的唯一用途是执行包含模糊逻辑结构或 AI 算法启发式的程序。
一些愚蠢的堆栈机器示例来演示这个想法:
push [x1]
push [y1] ;start coord
push [x2]
push [y2] ;end coord
pushmap [map] ;some struct
stepastar ;push the next step of A* heuristics to accumulator and update the map
pop ;do sth with is and pop
stepastar ;next step again
... ;stack top is a map
reward ;we liked the coordinate. reinforce the heuristic
stepastar
... ;stack top is a map
punish ;we didn't like the next coordinate. try something different
这里没有明确的启发式。假设我们将所有状态保存在 *map 中,包括启发式算法。
您会发现它看起来很傻,而且不完全区分上下文,但是如果不在线学习,神经网络就没有任何价值。