Sign in to follow this  
hanspetter

path evaluation..

Recommended Posts

Hello! At the moment, we are creating a new horse game. My task is to create the dressage system. How dressage works in real life is basicly: the rider has to remember a set of different programs. Each program got special tasks to perform and also a path to follow (wich is invisible so the player needs to learn it and remember it). So.. the problem is to evaluate how good the player followed the "invisible path". The best idea I can come up with is to create a set of detection points along the path, but this will lead to a couple of problems: - if one or more points are not detected - if the last point is detected before the player is done walking the path When I try searching google, I only find info about "path-finding" not "path evaluation", so it would be really great if anyone got a bright ida! :) ------------ Hans-Petter

Share this post


Link to post
Share on other sites
Define your ideal path as a set of points.

Record player's path as a set of points.

Cleanup the player's path (remove loops, wrong direction, out of area and similar situations - depending on how the player can move), possibly add additional punishment for each invalid situation.

Calculate the area between difference these two paths. The area itself is an index on how well the person followed the path.

Depending on your world, you might want to segment the whole process to provide real-time measuring or just to simplify calculations.

All of this could be performed on-the-fly, but then handling backtracking, or running in circles becomes a bit more annoying.

Share this post


Link to post
Share on other sites

Assuming you care about the pace the horse travels at:

Define a path through space-time as a function from "distance" to "location and time".

Ie, 5 feet along the path is at "location [10,2] time 2 seconds".

Store both the "ideal path" and the "path the player took".

Now you can do alot of things to these paths.

Naive: take the difference between the paths. Weigh the difference in location and the difference in time by a formula. Integrate the difference.

More nice: at each point along the player-path, find the closest "time space location" on the ideal path (taking into account the nominal distance travelled).

Useful: break the track up into logical chunks (tricks or what have you). Heuristically break the player path into being "part" of each logical chunk, and do a piece-wise path comparison by the above methods.

Detail: Have the logical chunks "blend into" each other, as opposed to having a sharp edge. The horse could be 50% part of the 'exit' of one trick and 50% into the 'entrance' of another trick.

Questions: in real life, how is dressage scored? Are you scored chunk-wise, based off some total effect, or what? Has anyone out there analyzed how people are scored in real life?

Share this post


Link to post
Share on other sites
since the "arena" the horse is walking on is an open field + I cannot use time checking, comparing two paths will not work very vell I think.. because if you walk everywhere, you will get close to all points at the wrong time.. :)

------------
Hans-Petter

[Edited by - hanspetter on April 6, 2006 9:12:32 AM]

Share this post


Link to post
Share on other sites
Quote:
Original post by hanspetter

Well, since the "arena" the horse is walking on is an open field + I cannot use time checking, comparing two paths will not work very vell I think.. because if you walk everywhere, you will get close to all points at the wrong time..


This is why the function should be a map from distance travelled to (location and time).

I assume the events are supposed to be done in order?

Why can't you use time checking?

Can you answer my questions? (in both this post and my last post) Otherwise, I can't help you.

Share this post


Link to post
Share on other sites
I think one way would be to store a discrete number of points on the ideal, invisible track and create a (number of) spline(s) (s1) that passes through them all, so you have a smooth curve.

Now, as the rider progress through the field, record her position at equally spaced points in time. When you have all (or enough) stored, create another spline (s2) between these points.

Then to find how good they match take the distance from the recorded points to the ideal spline and use that as an error metric. To find the distance, just use point-to-line distance, or calculate a vector perpendicular to the tangent to s2 and find the intersection between this vector and s1.

I think thats how I would do it.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this