Autopilot stops if end of in-play overlaps - RESOLVED

If you think you've found a mistake in the software, tell us here

Autopilot stops if end of in-play overlaps - RESOLVED

Postby ThomasAJ » Wed Feb 14, 2018 8:47 am

Hi Gavin

I think you have a bug in Autopilot when the END OF IN-PLAY overlaps a future selected race. ie there has been a significant delay in the in-plsy race.

(I am recording odds movements by writing to an Access table from the Odds Movements Excel spreadsheet AND I have been programming for decades :o )

Example:
Australia flat horse racing 14 Feb 2018.
By coincidence I was watching the pilot at 19:25 and it seemed to be stuck on '18:50 Launceston (AU) (R1)' when it suddenly skipped the next selected Race and landed on the one after being '19:10 Ascot (AU) (R6)' and then did nothing as this race was already closed.
There are other future selected races that the pilot could have moved onto but it did not.

I looked at my Access Db and the last entries were for '18:50 Launceston (AU) (R1)'.
Also the last entries in the Cymatic worksheet are for '18:50 Launceston (AU) (R1)'.

I have attached a screenshot of where it's at right now.

I'm hoping there is plenty of info here that will help you to debug. I know as a pro programmer (and more) for decades that I would have kissed the feet of any user that had ever given me so much detailed info. :lol:

Er... not meaning you should kiss my feet :roll:

Cheers
Tom

EDIT: After posting this I clicked on --> next arrow and it went to 19:45 Ascot but becasue it was closed nothing happened.
I clicked next again and it went to 20:00 Launceston and resumed working OK.
You do not have the required permissions to view the files attached to this post.
ThomasAJ
 
Posts: 15
Joined: Mon Feb 05, 2018 11:11 am

Re: Autopilot stops when in-play end overlaps future races/s

Postby Gavin » Wed Feb 14, 2018 5:13 pm

Hi Tom,

I needed a reliable method to ensure that the autopilot would become inactive at the end of the trading day (so that it doesn't go into an infinite loop continuously looking for the next race and being unable to find it). To implement that I made it become inactive (i.e. stop trying to move forward) only if it encountered a race status of 'closed' and if the current time was some time after the start time of the race, because this combination usually only happens at the end of the trading day when the last race is encountered and has finished. Unfortunately it means that it could also occur in the scenario that you described.

I could consider trying other options for detecting the end of the last race of the day, or extending the time calculation so that it has to be a longer time after the start of the race for it to be allowed to become inactive when it finds a race that becomes 'closed'. This is a fixed time period but it could be extended.

Kind regards,

Gavin
User avatar
Gavin
Site Admin
 
Posts: 3835
Joined: Wed Jan 23, 2013 9:11 pm
Location: United Kingdom

Re: Autopilot stops when in-play end overlaps future races/s

Postby ThomasAJ » Thu Feb 15, 2018 12:20 am

Hi Gavin

Thanks for that.

But I am unclear as to why you chose that logic to determine when the last selected race/event was reached when there is a known list (collection) of events.
Would not a 'For Each' loop simply exit when the last event was 'processed'?

Specifically, the "Choose markets for autopilot" returns a known set and then it can further be narrowed down by un-checking events.
So the last selected event is known and no further events need to be 'searched' for.

Don't mean to offend you but as a long time programmer i don't understand "so that it doesn't go into an infinite loop continuously looking for the next race and being unable to find it".

Thanks
Tom
ThomasAJ
 
Posts: 15
Joined: Mon Feb 05, 2018 11:11 am

Re: Autopilot stops when in-play end overlaps future races/s

Postby Gavin » Thu Feb 15, 2018 10:01 pm

Hi Tom,

I can't remember exactly what difficulties I encountered that made me decide to write that seemingly strange logic many years ago, but I vaguely recall as follows. In an early version of the Betfair API, you had to make an API call to expand each node in the list of markets to see the sub markets within it, so they were only populated on demand in the early version of Cymatic. Or that the details of each market were not known until you made an API call to grab them. So, if my memory serves correctly, there was no checkable list of markets in the autopilot in the early versions of Cymatic and the autopilot had to do a bit more work to look for each next market. Without a fully pre-populated list, there was no simple way to iterate it without making tons of API calls and so some strange logic had to be inserted to come up with an easy solution that wasn't pretty but it worked pretty well. There were quite a number of strange workarounds needed to get things working generally when using the early versions of the Betfair API. Most of those difficulties no longer exist in the current version of the Betfair API which Cymatic uses.

Another such difficulty was figuring out a reliable way to know the first moment when a race has truly ended, which is not as easy as it sounds because Betfair sometimes accidentally change the status of an event for a fraction of a second, then change it back again. This difficulty still exists, albeit rare.

So you are probably correct, given that there is now a pre-populated list in the autopilot which could be iterated without making any additional API calls, that this part of the code may benefit from a bit of an overhaul now that the difficulties mentioned no longer exist.

Kind regards,

Gavin
User avatar
Gavin
Site Admin
 
Posts: 3835
Joined: Wed Jan 23, 2013 9:11 pm
Location: United Kingdom

Re: Autopilot stops when in-play end overlaps future races/s

Postby ThomasAJ » Wed Nov 27, 2019 1:19 am

Hi Gavin

Checking back to see if you have updated the 'check for last race' logic.

The problem as I described in early early 2018 means that 'set and forget' bots cannot be used across multiple races.

Actually I'm surprised there's not more noise about this issue.

Cheers
Tom
ThomasAJ
 
Posts: 15
Joined: Mon Feb 05, 2018 11:11 am

Re: Autopilot stops when in-play end overlaps future races/s

Postby Gavin » Wed Nov 27, 2019 11:57 pm

Hi again Tom,

Unfortunately a very long list of requested features developed over the years and I have a significant workload for various reasons. Cymatic has become a very complex software program, so adding new features has to be done very carefully in order to not mess anything up and this entails a lot of testing too, so adding new features doesn't happen as quickly or as often as I'd like. Sorry!

Kind regards,

Gavin
User avatar
Gavin
Site Admin
 
Posts: 3835
Joined: Wed Jan 23, 2013 9:11 pm
Location: United Kingdom

Re: Autopilot stops when in-play end overlaps future races/s

Postby Gavin » Wed Apr 08, 2020 10:14 pm

Hi Tom,

Sorry for the long delay in resolving this.

I think I may have now found the cause of this problem and am working on fixing it. I will post another message once I have done the testing and released a new version.

Kind regards,

Gavin
User avatar
Gavin
Site Admin
 
Posts: 3835
Joined: Wed Jan 23, 2013 9:11 pm
Location: United Kingdom

Re: Autopilot stops if end of in-play overlaps - RESOLVED

Postby Gavin » Fri Apr 10, 2020 12:45 pm

A new version of the Cymatic software (version 6.11.1.0) has been released today that addresses the following problems:

1. The autopilot was sometimes getting stuck if it encountered a race marked as 'closed' at the exchange. This has now been fixed.
2. The race types (Harness, Flat, etc) chosen by the user were being ignored in the software (* but please see note below because there is also a further problem with this caused by the exchange).

* Please note that at the time of writing, Betfair appear to be loading some markets with the wrong race type, for example Harness/Trots markets are being marked as 'Flat' races by Betfair. I will report this to Betfair in the hope that they correct this going forward. Therefore it will still not be possible in Cymatic to choose to filter the Harness race types, until Betfair fix that problem at the exchange.

The software will automatically update itself to the new version when you open it.

Kind regards,

Gavin
User avatar
Gavin
Site Admin
 
Posts: 3835
Joined: Wed Jan 23, 2013 9:11 pm
Location: United Kingdom


Return to Bugs

Who is online

Users browsing this forum: No registered users and 0 guests