• Hi Guest Just in case you were not aware I wanted to highlight that you can now get a free 7 day trial of Horseracebase here.
    We have a lot of members who are existing users of Horseracebase so help is always available if needed, as well as dedicated section of the fourm here.
    Best Wishes
    AR

Of VDW and ANN's

rave154

Yearling
Hello folks,

been a while,

way back in 1999/2000 i built a bespoke Database of all the racing post's results from jan 1 1988 onwards,

much like yourselves i imagine, i tried this approach, i tried that approach,

i tried side-ways approaches, i tried bayesian approaches, fuzzy logic,

genetic algorythms( spelling?) which was interesting but still no joy,

i tried turing (yes THAT guy) AI networks, a concoction of my own,

REALLY good at memorising, but hopeless at generalising,

then i got onto artificial neural networks ( hence the title )...i should mention

that i have had ( and still do i guess ) a strong interest in VDW after seeing my first ever copy of the RHB

april 13 1985 i beleive where "vdw spells it all out" ( correct me if im wrong with that date )

so, back to 1999'ish... i get into artificial neural networks, not with much success,

i tried many things and they all came back with the success rate both in terms of win % and profit ..or should

i say loss % of merely backing the fav!

ironically, the one thing it did show promise was with trying to predict the "PRICE" of a horse on a given day

but lets leave that alone for now....

at that time, i viewed ANN's ( artificial neural networks ) as a sort of "guru" who would solve allllll my problems..


so, i chucked as much horse racing data as i could find into the ANN and metaphorically said ..

"here...YOU sort it out!"... the results were as i described as above.


i do remember however one RHB reader calling me on the phone one night enquiring

about my DB with a view to ANN's, he mentioned something about a medical study that the ANN had

picked up that the drug worked best when women were at/before/just after their period, which all the

doctors had missed, which i though was interesting, i think it may have been M K Kent..but...a long time ago...

so, here we are, 2024...and ANN's have moved on quite a bit, as im sure folks seeing/using chatGPT will

attestify to.... emboldned by this, i re-invested my efforts into AI and came up with a new approach,


using FANN ( a C++ dll with a delphi wrapper for usability ) i began again, but with a different view,


instead of dumping all the race data into the AI and hoping for the best...i took a different road..

the result..


approximately 55-60% winners at an average price of around 9/2

i re-thank(is that even a verb?)...and added to my way of thinking, sharpening the edge so to speak,

the results,

20 bets, 17 winners, average price around 5/1

that win% might get your attention, it did mine,

i should say that the data i am feeding the NN is VERY BASIC, it has been mentioned on here many many times,

but, hopefully this will sparke some thought/s and interest?,

i am off bike-packing tomorrow in snowdonia, but i will return friday, and hopefully

can access this forum via phone in the meantime,

till then

au revoir
 
Last edited:
i am back rather earlier from my camping tour, due to a rather strong sun tan ( im a crispy critter ) and some heat stroke,

at the moment im sat here almost covered head to foot in cammomile lotion, i must look like Casper the Ghost!

( good name for a horse there ? )
 
Last edited:
Hello folks,

just a quick description of artificial neural networks and their workings,

basically an ANN is a collection of whats called 'perceptrons' linked in a way to somewhat mimic

the structure of a brain.

Each perceptron or nueron has a number of inputs and also a number of outputs, those outputs

will be connected to the input side of other neurons until at such point we arrive

at 1 or more outputs which will indicate our desired output.

For example, a typical ANN will have 1 input layer comprised of 1 or more neurons,

it will have 1 (or more) "middle/hidden layers" again comprised of 1 or more neurons,

and finally it will have an output layer comprised of 1 or more neurons.

FANN ( Fast Artificial Neural Network ) is a C++ Dll, which in my case uses a wrapper around it

to enable easy usage in the language i code in ( Delphi ), but many languages are suitable.

the input layer neurons are set to values of previous race data ( eg :- finishing position LTO ) etc,

the middle/hidden layer is left alone, the output layer is set to the outcome we wish to predict
( the finishing position of a horse in a race yet to be run )

each connection between neurons ( synapse ) has a 'weight' ( basically a number )

which is multiplied in simple terms times the inout data to compute the output value

of the neuron, this value then becomes the input value of the next neuron/s that it is connect to.

each pass of the network, the overall output value is calculated ( Expected finishing position )

and this is compared to the ACTUAL finishing position since while training the network we are

using races/data that have already been run and we already know the result.

The network then looks at the difference between the value that was predicted and the ACTUAL value

and adjusts the neuronal weights such that on the next pass the predicted output will

better approximate the ACTUAL result, at the end of each cycle the mean square root of the sum of the errors

is calculated and the cycle repeats until such point that this error is small enough or lower that a preset value.

this concludes the "training" phase and the ANN is now said to be 'trained'.


At this point the ANN, is again fed race data, but this time it is NOT SHOWN the actual result but rather

asked to predict what it thinks the result will be, outside of the network this prediction is then compared

to the actual result and an overall assessment of profit/loss etc is made.



The big quesiton is, what data do you feed to the ANN and just as important, how do you present that data to

the ANN.

As stated in the intro post, (there was a typo in it btw ), i initially found the ANN gave around 60-65% winners

at an average price of around 9/2, changing the way of evaluating things gave 20 bets and 17 winners at an average

price of around 5/1.


All these results were from 1 years worth of data and using only races with 10 runners for simplicity at the moment.

At this point ( back in december ) i was convinced i MUST have made a mistake, i scanned the code over and over looking for where

i had gone wrong, i found nothing, the only option left was to test the ANN on new data of current days, hence

bringing the DB up to date ( which has taken longer than i thought, but here we are )

I am currently finishing the code that allows current ( ie tomorrows races ) race data to be fed to the network

and ( at the risk of plagiarism of Doc Emmet Brown ) ....the rest as they say.......is History, Future History!
 
Last edited:
Hello folks,

just a quick description of artificial neural networks and their workings,

basically an ANN is a collection of whats called 'perceptrons' linked in a way to somewhat mimic

the structure of a brain.

Each perceptron or nueron has a number of inputs and also a number of outputs, those outputs

will be connected to the input side of other neurons until at such point we arrive

at 1 or more outputs which will indicate our desired output.

For example, a typical ANN will have 1 input layer comprised of 1 or more neurons,

it will have 1 (or more) "middle/hidden layers" again comprised of 1 or more neurons,

and finally it will have an output layer comprised of 1 or more neurons.

FANN ( Fast Artificial Neural Network ) is a C++ Dll, which in my case uses a wrapper around it

to enable easy usage in the language i code in ( Delphi ), but many languages are suitable.

the input layer neurons are set to values of previous race data ( eg :- finishing position LTO ) etc,

the middle/hidden layer is left alone, the output layer is set to the outcome we wish to predict
( the finishing position of a horse in a race yet to be run )

each connection between neurons ( synapse ) has a 'weight' ( basically a number )

which is multiplied in simple terms times the inout data to compute the output value

of the neuron, this value then becomes the input value of the next neuron/s that it is connect to.

each pass of the network, the overall output value is calculated ( Expected finishing position )

and this is compared to the ACTUAL finishing position since while training the network we are

using races/data that have already been run and we already know the result.

The network then looks at the difference between the value that was predicted and the ACTUAL value

and adjusts the neuronal weights such that on the next pass the predicted output will

better approximate the ACTUAL result, at the end of each cycle the mean square root of the sum of the errors

is calculated and the cycle repeats until such point that this error is small enough or lower that a preset value.

this concludes the "training" phase and the ANN is now said to be 'trained'.


At this point the ANN, is again fed race data, but this time it is NOT SHOWN the actual result but rather

asked to predict what it thinks the result will be, outside of the network this prediction is then compared

to the actual result and an overall assessment of profit/loss etc is made.



The big quesiton is, what data do you feed to the ANN and just as important, how do you present that data to

the ANN.

As stated in the intro post, (there was a typo in it btw ), i initially found the ANN gave around 60-65% winners

at an average price of around 9/2, changing the way of evaluating things gave 20 bets and 17 winners at an average

price of around 5/1.


All these results were from 1 years worth of data and using only races with 10 runners for simplicity at the moment.

At this point ( back in december ) i was convinced i MUST have made a mistake, i scanned the code over and over looking for where

i had gone wrong, i found nothing, the only option left was to test the ANN on new data of current days, hence

bringing the DB up to date ( which has taken longer than i thought, but here we are )

I am currently finishing the code that allows current ( ie tomorrows races ) race data to be fed to the network

and the rest as they say...... ( at the risk of plagiarism of Doc Emmet Brown ) ..is History, Future History!
20 bets 17 winners av 5/1
At this point Iโ€™d like to say you are my new best friend , can I have the next 20 bets please.๐Ÿ™
 
Thats funny i was just talking about camoline lotion last week how we thought it was good sun cream as all mum put on us lol after being burnt to crisp and that was 50 years ago at least.
And here you are still burnt to crisp rubbing camoline lotion on yet sitting having nearly solved how horses will run before they run on any given day.
Just sounds incredibly back to front to me stop burning to crisp then relax and work out a horse race.
 
Thats funny i was just talking about camoline lotion last week how we thought it was good sun cream as all mum put on us lol after being burnt to crisp and that was 50 years ago at least.
And here you are still burnt to crisp rubbing camoline lotion on yet sitting having nearly solved how horses will run before they run on any given day.
Just sounds incredibly back to front to me stop burning to crisp then relax and work out a horse race.
Easy Tiger, i aint solved it yet....but i am Tantalisingly close ( it would seem )
 
from my recent post..

"As stated in the intro post, (there was a typo in it btw ), i initially found the ANN gave around 60-65% winners

at an average price of around 9/2, changing the way of evaluating things gave 20 bets and 17 winners at an average

price of around 5/1."

i should add that those results were from flat racing only ( for simplicity of not having to factor fallers & PU's etc )

and used just over 1 years results with only races that had 10 runners.

for fun only, extrapolating out... if i eventually use races with say 5-25 runners, then it might give

around 380 bets per year with around 323 winners, but thats just an estimate.

i am currently putting the finishing touches to the code that downloads the cards for "today / tomorrow"

and parses out the appropiate data to be sent to the ANN so it can make its prediction ( without knowing

the result of course, unlike in the training phase of the ANN )
 
Last edited:
Back
Top