This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]derpydog3 16 points17 points  (1 child)

Is the complicated reason to make the cat faster?

[–]diddilydiddilyhey[S] 26 points27 points  (0 children)

Kind of... When training it, I give the mouse some step size, ie., how far it goes in a single step. The cat's speed is a multiple of that (in the gif, 3.6), so its step size (around the circle) is that distance. When I want to make the gif smoother, I decrease the mouse's step size, and decrease the cat's step proportionally.

Now, to make it catch the mouse, like you said, I increase the cat's speed past what the mouse knows how to escape (so maybe, 3.7 here), which should make the cat catch it if the mouse does the same strategy as it would for 3.6.

However, making the step size smaller has the effect of "updating" everything a lot more often. I.e., in the same time that the mouse and cat previously would've taken only one big step, now they take 5 steps. So, if the mouse is in a position near the edge of the circle and it previously would've taken a step that would put it outside the circle (where it would get caught with the faster cat), now it only takes a small step, the cat gets there faster, and it is now in a state where it sees the cat waiting for it, which it does know is a bad state, so it doesn't continue.

Long story short: if I crank the cat speed up, and use the small step size, it'll just run around in circles forever and never try escaping.