Mathematically any function can be represented with only two layers
Bwaaa???
Really? I had read that most problems are solved with only one hidden layer, but I didn't know of any mathematical law that said it was always possible? I assume that means "with an arbitrarily large hidden layer" then?
RE: my setup:
Yes, it's basically an adjacency matrix (with floats for elements). The columns (inputs) correspond to "strict" inputs and memories. The rows (outputs) correspond to "strict" outputs and the updated values for memories.
I've already got a "SetAllowedCoeffs" method which lets me enforce that certain coefficients must be zero. To make it emulate a traditional 1-hidden-layer ANN, I just need to disallow nonzero coefficients mapping directly from inputs to outputs, or from memories to memories. That should be trivial to do. Emulating passing some outputs back in as inputs... maybe harder, because of the temporal aspect. Although maybe if instead of trying to emulate it, I actually had additional inputs and outputs for it... I could try it. Might, even.
RE: no upper limit:
I can pick an arbitrarily large limit, but the real upper limit is indeed "how many pieces of gravel can I put under the player's foot before it makes the simulation cry?" And even though IRL there's a lot of nerve endings in a foot, I think the way we actually handle the foot/ground interaction is a lot more reactive force feedback than some comprehensive understanding of the external rigid-body physics. Maybe even to the extent that I don't even need to give it any contact point info as inputs... or so I had thought.
I'll think about categorizing the contact points into "sensor areas", and maybe taking some kind of average for everything within a sensor area. Dunno if I'm actually going to implement that yet.
Personal aside:
You (anyone reading this) may notice that I've got a habit of not trying things to see if they work. It's irrational, I know, but it's the result of ~2.5 years of nothing that I can say "works", and often when I try things not even being able to tell whether they're a step in the right direction. If you've got an idea, go ahead and suggest it, and I'll tell you why it cannot be done[1]. And if you still think your idea has particular merit... idk, convince me?
[1]A joke.