I have an AI-type of algorithm that I'm trying to teach to find the "right" time to do things. I think a reasonable model system for it to train on would be something that bounces around in some sort of space as a function of time, such that at certain times, a push would do nothing (leave it on the same trajectory), while at other (rare) times, a push would send it towards a different stable point. I want it to discover those important points with feedback. For example, if I had a model of a swinging pendulum, then adding a "kick" to get it going faster would be best at an edges of the trajectory, while pushing it in the middle might actually slow it down (like pushing a kid on the swings, you learn to push at the very end of the upswing). Or, one of those magnetic "make a decision" novelty toys: it's a magnet on a string, and it's hanging over a field of a few other magnets. When you let it go, it starts to bounce around and eventually settles into one of several, very hard to predict, positions (kind of like the old 8-ball toy). Seems to me that ought to have the property I'm looking for. I'd like something (in Matlab ideally) that would graphically show the evolution of a dynamical system, and make it easy to implement giving it an external kick at various times, and also to read out its position at any time. So, I need a simulation that evolves in time, not an analytic solution of the pure system. Any ideas?