Re: Newbie Pattern matching Question
Johannes Slotta <[email protected]>
| Newsgroups | gmane.comp.java.robocode |
|---|---|
| Message-ID | <CA+-w=RwnbPd-y92mUHeXmJTvk1CbCepg9AKjcn1HwFWwJL_wvw@mail.gmail.com> |
Hi, not having done such thing in robocode, computing the distances of vectors, and the tuple (heading change, velocity) can be seen as such, can be done by computing vT x A x v, with vT being the difference vector in horizontal, v in vertical, and A some symmetric matrix. In the simplest form, A is a diagonal matrix, this means the expression will evaluate to w1*v1^2+w2*v2^2, with w1 and w2 being some weights and v1 and v2 the elements of the vector, so in your case heading change and velocity. If you compute those values you might find the vector that is next to the one you are comparing to, but you may need some runs to find good values for w1/w2. Fails if there is no good matrix for all vectors, but usually a first try, especially in the simplified version. Hope that helps, Johannes On Mon, Nov 10, 2014 at 5:39 AM, <[email protected]> wrote: > Hi, Sorry if this is a really newbie question. > > In my pattern matching gun I'm working on right now i keep track of the enemies' heading change as well as velocity. When churning through my history, do i try to find the best match for heading change, velocity, or both? If both, how would one do so? > > Thanks in advance! Any tips will be highly appreciated! > > -- > You received this message because you are subscribed to the Google Groups "robocode" group. > To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "robocode" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.