Hang on, you're storing your velocity and delta-heading in different characters, so you don't need to use a byte, you can use a 'short'. It's 16 bits, so you can use a higher multiplier. Be careful though, because using too high a multiplier means you never find a pattern exactly like this one. Another idea: search for a really long pattern, and if you don't find one, search for one half it's length, and keep halving the length of the pattern you're looking for, until you find a pattern that matches. About your fights against PatternBot etc, the above may fix it, but only if the problem is in your pattern-search. I'd like to see the code from inside your getRecentPattern?() method, it's the only thing I haven't been able to go over. Also, if there is a problem in your movement rebuilding, such as playing the data backwards, you obviously still won't be able to hit them =) -- Skilgannon |