Horse Racing Forum - PaceAdvantage.Com - Horse Racing Message Board

Go Back   Horse Racing Forum - PaceAdvantage.Com - Horse Racing Message Board


View Single Post
Old 08-10-2017, 12:13 AM   #41
Jeff P
Registered User
 
Jeff P's Avatar
 
Join Date: Dec 2001
Location: JCapper Platinum: Kind of like Deep Blue... but for horses.
Posts: 5,293
I've been doing this for scratches, surface changes, and race distance changes in JCapper for years.

Last year, after closing day for Saratoga, I bit the bullet and spent the better part of three weeks adding changes in track condition and rider changes.

That said, getting it done turned out to be a lot more work than I imagined going in.

Mistakes, corrections, and corrections of corrections for all of the above mentioned changes types can and do show up in the xml.

It's not terribly difficult to handle the more common cases once you've seen them.

But there are a number of hurdles you'll have to overcome - mainly for the things you don't expect.

For instance, sometimes a track somewhere will ask Equibase to change the name of their track -- with the result being that one day out of the blue the new track name shows up in the xml and breaks your parse routine.

After reprogramming the app several times for those I ended up creating a table with a user interface that gave the user the ability to make those kinds of changes on the fly.

When I enabled parsing of rider changes I discovered there are differences between the rider names in the xml and the rider names in the data file and/or chart file for the same rider.

To handle those I ended up creating a table that (among other things) contains fields for rider name as read from the xml and rider name for the same rider as read from the data and/or chart file -- plus a parse routine that runs automatically to populate the data file or chart file side of the table -- plus a button the user can click to clear the table -- plus a second button the user can click to manually initiate the populate table with rider names routine...

Plus an aglorithm that matches rider name as parsed from the xml with the data file name for that same rider -- with a high degree of accuracy.

I found it really helpful to auto-strip any and all punctuation characters from names on all sides (data file, chart file, and the xml) before doing any name matching.

In something like 997 out of 1000 cases the name matching happens automatically behind the scenes - and rider changes process seamlessly. (To make this work you need to have clean data sitting in the table.)

But for the rare case where the algorithm fails to match a name:

I ended up creating a formal user interface enabling the user to perform manual rider changes. Sometimes the rider name in the data file is something like "no rider" -- or the rider name in the xml is an obvious data entry error -- or something incomplete like "tbd" or "tba", etc. And every once in a blue moon you have a new rider name in the xml for somebody who happens to be picking up his or her very first mount.

Obviously, under those circumstances auto-name matching isn't going to happen.

Having a manual rider changes interface also comes in handy for late rider changes announced as the field faces up to the gate.

In such cases the horse is returned to the paddock so it's not uncommon for several minutes to pass before the change is announced or appears on the track video. But somehow such changes have a way of not showing up in the xml so you can parse them (at least not before the race goes off.)

The formal interface for manual rider changes enables the user to pull up the current horse after selecting date-track-race from drop downs -- select the replacement rider name from a drop down pre-populated with rider names sitting in the table -- or alternately key the replacement rider name manually -- and then persist the change by clicking an Apply button.

To my way of thinking a rider change entails more than just a name change. It also entails stats changes. Sometimes the stats changes are significant enough to cause a change in probabilities not just for the horse with the rider change but for the other horses in the field as well.

To that end I created an algorithm to pull up stats for the replacement rider and overwrite the existing rider name and stats in the data file with the replacement rider name and replacement rider stats.

None of this required what I'd call true brilliance. But I wouldn't call it child's play either.

By posting this -- my hope is that someone who decides to take this on will end up avoiding some of the obstacles I encountered along the way.



-jp

.
__________________
Team JCapper: 2011 PAIHL Regular Season ROI Leader after 15 weeks
www.JCapper.com

Last edited by Jeff P; 08-10-2017 at 12:22 AM.
Jeff P is offline   Reply With Quote Reply
 
» Advertisement
» Current Polls
Which horse do you like most
Powered by vBadvanced CMPS v3.2.3

All times are GMT -4. The time now is 07:52 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 1999 - 2023 -- PaceAdvantage.Com -- All Rights Reserved
We are a participant in the Amazon Services LLC Associates Program, an affiliate advertising program
designed to provide a means for us to earn fees by linking to Amazon.com and affiliated sites.