TPD Speed Data in Guardian: Is this possible?

Advanced automation available in Guardian - Chat with others and share files here.
Post Reply
Safeway
Posts: 108
Joined: Sat Mar 18, 2023 7:00 pm

I received some info from Dallas on this subject but it was pretty off the topic of that thread. I’m not quite getting the suggestion so I thought I ought to put my question in a new thread.

I am trying to create a bot which will continually average runner speeds from the start to the end of a race giving me a flow of average values, each average containing one more speed sample than the last as a horse travels a little further and another speed sample is taken then tallied and averaged. This average SV will be changing but at any point would show the ‘effective’ speed of each runner to that point based on the distance travelled and time taken.

Dallas has suggested to not use History Lists for this purpose. I know I can sample a speed every 0.5 seconds (maybe excessive) and I know how to average these over (say) 10 seconds worth of sampled speeds shifting as one speed value enters the tally and one drops out.)

BUT I don’t know if there is a way for the ‘average SV’ to be the average of an increasing number of values as the race progresses. At the moment the race starts the average would be of one speed sample, 10 seconds later would be the average of 20, after a minute it would be the average of 120 speed samples etc.

This may seem mad but as I study times and distances more and more it would be invaluable at (just say) the mid point of the race to know the ‘effective’ speeds achieved by the runners to that point and could be useful for the triggering of bets, maybe subject to also to other, additional conditions based on SV’s derived in other ways.

If it can’t be done or is impractical that’s fine but before looking at other methods I just wondered if this holy grail is possible / practical.

Thanks Dallas and anybody else 👍
User avatar
Dallas
Posts: 22829
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

Sorry I never replied to your post on the other thread, I did see it and intended to reply later then forgot :P

To get the average you've mentioned above you can go back to using History lists and set it up as follows
Screenshot 2024-05-10 120845.png

If you arm the rule as soon as it goes in-running and have it re-arm every 0.5secs that will collect all the data points you need
In the image above you can set the sampling to anything you want (ie, every 10secs) s

That will give you an average of the speed from the start then using the values every 10secs
You do not have the required permissions to view the files attached to this post.
Safeway
Posts: 108
Joined: Sat Mar 18, 2023 7:00 pm

Thank you Dallas :D

I didn’t think you hadn’t replied! My question was pretty much on the wrong thread.

A few days ago I was sat staring at that screen and I couldn’t work out what I should select and wondered if it could cater for whatI was liking for.

In the screenshot then the ‘sample every 10 seconds’ means that every 10 seconds I will get an an average of every value from the start? If I wanted to speed up the number of ‘from the start averages’ I could sample every 5 seconds or 1 second?

Sir, you are a scholar and a gentleman!
User avatar
Dallas
Posts: 22829
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

Safeway wrote:
Fri May 10, 2024 1:21 pm

In the screenshot then the ‘sample every 10 seconds’ means that every 10 seconds I will get an an average of every value from the start? If I wanted to speed up the number of ‘from the start averages’ I could sample every 5 seconds or 1 second?

Sir, you are a scholar and a gentleman!
Yes, that is exactly right
Safeway
Posts: 108
Joined: Sat Mar 18, 2023 7:00 pm

Thanks again Dallas.

The bit that was throwing me was the thought that if the sample was every 10 seconds that I would only be seeing an average of the 10 seconds worth of speed readings.
I will try taking that to one second averaged samples. If this isn’t useful I don’t know what is.
I appreciate the log will be longer than War & Peace 😊
Safeway
Posts: 108
Joined: Sat Mar 18, 2023 7:00 pm

Sorry Dallas - this isn't working for me and I must have got something wrong. Here is a sample from the log:-

The range calculation value is repeatedly invalid on all runners all the way through the race.

I have tried to attach the rules file I am using here - hope this helps. Not sure if I should have given a name to this or whether this bit should even appear in the way it does.

Please could you let me know what I should do or if you're able to amend the rules file then fantastic.

While we're at it.....you will see I have not yet added any rule to trigger bets. When I do (or at least try to) these will have a condition related to distance travelled or distance to go. I assume I would need to have the distance metrics stored as an SV too? Surely I must? With me its a tiny step at a time :cry:

Thanks again :)
You do not have the required permissions to view the files attached to this post.
Safeway
Posts: 108
Joined: Sat Mar 18, 2023 7:00 pm

Hi Dallas - if you get a moment would you mind looking over my little problem here. I’m sure it’ll take you about 1 second to sort 😀

Thanks a million.
User avatar
Dallas
Posts: 22829
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

Safeway wrote:
Tue May 14, 2024 1:01 pm
Hi Dallas - if you get a moment would you mind looking over my little problem here. I’m sure it’ll take you about 1 second to sort 😀

Thanks a million.
I'll take a look this afternoon and get back to you
User avatar
Dabbla
Posts: 672
Joined: Wed Apr 15, 2009 1:50 pm

Safeway wrote:
Mon May 13, 2024 6:49 pm
Sorry Dallas - this isn't working for me and I must have got something wrong. Here is a sample from the log:-

The range calculation value is repeatedly invalid on all runners all the way through the race.

I have tried to attach the rules file I am using here - hope this helps. Not sure if I should have given a name to this or whether this bit should even appear in the way it does.

Please could you let me know what I should do or if you're able to amend the rules file then fantastic.

While we're at it.....you will see I have not yet added any rule to trigger bets. When I do (or at least try to) these will have a condition related to distance travelled or distance to go. I assume I would need to have the distance metrics stored as an SV too? Surely I must? With me its a tiny step at a time :cry:

Thanks again :)
You will need to ever speed up the sample rate or make the from/ to longer.

The sample rate is , how many data points are used to get the average.
If the to / from is 10 seconds and the sampling is 1 second then Guardian will have 10 data points to calculate the average.

14/05/2024 15:03:43: [G_Auto 4] : Store (range calc) Value (Shared) for Est Illic: average_speed_start_to_current = 27.977 = 27.98


Safeway wrote:
Mon May 13, 2024 6:49 pm

While we're at it.....you will see I have not yet added any rule to trigger bets. When I do (or at least try to) these will have a condition related to distance travelled or distance to go. I assume I would need to have the distance metrics stored as an SV too? Surely I must? With me its a tiny step at a time :cry:

Thanks again :)
You can use the condition (stored value condition) > total performance data about selection > distance to finish (meters)
User avatar
Dallas
Posts: 22829
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

Dallas wrote:
Tue May 14, 2024 2:59 pm
Safeway wrote:
Tue May 14, 2024 1:01 pm
Hi Dallas - if you get a moment would you mind looking over my little problem here. I’m sure it’ll take you about 1 second to sort 😀

Thanks a million.
I'll take a look this afternoon and get back to you
So there were two things needed to change,
1) take the Average range SV off the TPD rule and put it on its own rule armed to trigger from 10secs after going in-running, rearming every 10secs afterward
2) (this one was my fault in how to configure the HL) it should look like this with the from set to look back up to 600secs ago
HL.png
Then as Dabbla said above the rearm/sampling si


This was a log with the Speed being stored every second and the sampling every 10secs
Log.png
You do not have the required permissions to view the files attached to this post.
Safeway
Posts: 108
Joined: Sat Mar 18, 2023 7:00 pm

Dallas / Dabbla

Thanks both. It works :D

Very grateful for your help.
User avatar
Dallas
Posts: 22829
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

Safeway wrote:
Tue May 14, 2024 8:00 pm
Dallas / Dabbla

Thanks both. It works :D

Very grateful for your help.
No probs, glad its now working how you want :)
Post Reply

Return to “Bet Angel - Automation”