ANY Selection clarification

User to User support only. For technical support visit www.betangel.com/support/
Post Reply
SomeDude
Posts: 28
Joined: Fri Sep 24, 2021 5:32 am

I just drafted a long post, only to lose it because my session timed out while typing. :evil: :evil: :evil: That'll teach me to copy text before trying to post and seeing the login screen appear!

I'll try to make this one short and to the point!

I'm confused about how the "Applies to Selection: ANY" option operates in conjunction with the Conditions->Selection->Current Selection (ANY selection)" option.

I had an in-play automation rule trigger and place a bet on a runner for which not all conditions were met, so decided to check the logs.

In short, the rule was for Applies to Selection: ANY. The conditions were for Current Selection (ANY selection). I assumed that the ANY at the rule level continuously evaluates all runners in turn. Each runner is "Selected" (temporarily), and thus becomes the "Current Selection" temporarily, to be evaluated against all conditions to determine if the rule should trigger.

I believe my rule triggered because at least one runner met each rule condition, even though the matching runner might not have been the "Current Selection".

For clarity, here's an example:

Automation Rule 1: "Applies to Selection: ANY", Back Bet on trigger Conditions: 1) Current Selection (ANY selection) BackPrice <5 2) Current Selection (ANY selection) LayPrice <7 3) Current Selection (ANY selection) LastTraded <8

Horse 1: Back Price 5.5, Lay Price 8, Last Traded 6 (Meets condition 3 only)
Horse 2: Back Price 3, Lay Price 5, Last Traded 3.5 (Meets conditions 1, 2, and 3)

Rule triggers and back bet is placed on horse 1.


How I expected the software to work:

- Select horse 1 from ANY, Set Horse 1 to Current Selection, Evaluate for horse 1->Does Current Selection (ANY selection) meet condition 1? (No)->Does Current Selection (ANY) meet condition 2? (No)->Does Current Selection (ANY selection) meet condition 3? (Yes, horse 1 is Current Selection and horse 1 meets condition).
- Some conditions not met, do not trigger
- Repeat for other runners

Instead, I think that the software worked as follows:

- Select horse 1 from ANY, evaluate for horse 1 ->Does ANY selection meet condition 1? (Yes, horse 2)->Does ANY selection meet condition 2? (Yes, horse 2)->Does ANY selection meet condition 3? (Yes, horse 1).
- All conditions met, initiate trigger

Since the rule triggered and a bet was placed on horse 1, I believe that when Current Selection is ANY, there isn't actually any relationship to the horse being evaluated by Applies to Selection "ANY". In other words, even though a horse selected by ANY might be the current selection for betting purposes, it's NOT the current selection for evaluating Conditions. ANY really does mean ANY... not the current selection selected from ANY.

Can someone who knows Bet Angel logic please confirm how the "Applies to Selection ANY" relates to the Conditions->Current Selection (ANY)?

Follow-up questions:
If ANY really does mean ANY... how do you write rules for ANY runner, where the runner being evaluated for betting purposes must meet multiple conditions a,b,c,d,e? You can't use the Current Selection option and you can't nominate the runner since the runner isn't known in advance. It seems the only option is to create tons of rules for each and every runner individually, but that would quickly get too complicated.

If there is supposed to be correlation and Current Selection (ANY selection) is supposed to evaluate the temporary nominee from "Applies to Selection: ANY", why would I have the problem where a bet was placed on a runner where all conditions were not met, as confirmed by logs?

Thanks everyone!

Cheers
SomeDude
User avatar
Dallas
Posts: 22673
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

When applying a rule to 'ANY' selection it will start by checking the runner in row 1 and testing all your conditions against, if they are met all met it triggers and job done
If it reams it will start by checking the selection in row 1 again

If one or more conditions are not satisfied by the selection in row 1 it will move on and check if the selection in row 2 meets them then row 3 and so one
User avatar
jamesedwards
Posts: 2234
Joined: Wed Nov 21, 2018 6:16 pm

Dallas wrote:
Wed Jan 19, 2022 12:38 pm
When applying a rule to 'ANY' selection it will start by checking the runner in row 1 and testing all your conditions against, if they are met all met it triggers and job done
If it reams it will start by checking the selection in row 1 again

If one or more conditions are not satisfied by the selection in row 1 it will move on and check if the selection in row 2 meets them then row 3 and so one
So 'ANY' will stop as soon as it finds it's first successful trigger, while 'ALL' will keep going until it has checked (and triggered where relevant) through every selection?
User avatar
Dallas
Posts: 22673
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

jamesedwards wrote:
Wed Jan 19, 2022 3:28 pm
Dallas wrote:
Wed Jan 19, 2022 12:38 pm
When applying a rule to 'ANY' selection it will start by checking the runner in row 1 and testing all your conditions against, if they are met all met it triggers and job done
If it reams it will start by checking the selection in row 1 again

If one or more conditions are not satisfied by the selection in row 1 it will move on and check if the selection in row 2 meets them then row 3 and so one
So 'ANY' will stop as soon as it finds it's first successful trigger, while 'ALL' will keep going until it has checked (and triggered where relevant) through every selection?
By 'ALL' I assume you mean 'Every'?

If that's right then yes what you've said is correct
User avatar
jamesedwards
Posts: 2234
Joined: Wed Nov 21, 2018 6:16 pm

Dallas wrote:
Wed Jan 19, 2022 3:54 pm
jamesedwards wrote:
Wed Jan 19, 2022 3:28 pm
Dallas wrote:
Wed Jan 19, 2022 12:38 pm
When applying a rule to 'ANY' selection it will start by checking the runner in row 1 and testing all your conditions against, if they are met all met it triggers and job done
If it reams it will start by checking the selection in row 1 again

If one or more conditions are not satisfied by the selection in row 1 it will move on and check if the selection in row 2 meets them then row 3 and so one
So 'ANY' will stop as soon as it finds it's first successful trigger, while 'ALL' will keep going until it has checked (and triggered where relevant) through every selection?
By 'ALL' I assume you mean 'Every'?

If that's right then yes what you've said is correct
Yes, sorry I meant 'EVERY', not 'ALL'. Thanks for confirming.
SomeDude
Posts: 28
Joined: Fri Sep 24, 2021 5:32 am

Dallas wrote:
Wed Jan 19, 2022 12:38 pm
When applying a rule to 'ANY' selection it will start by checking the runner in row 1 and testing all your conditions against, if they are met all met it triggers and job done
If it reams it will start by checking the selection in row 1 again

If one or more conditions are not satisfied by the selection in row 1 it will move on and check if the selection in row 2 meets them then row 3 and so one
Thanks Dallas. I appreciate you responding, as always.

I totally get how ANY selection works with simple conditions, e.g., Market is in-play or Favourite is <2.

The problem is specifically and only when the ANY is used as both the selection criteria and the Current Selection within a Condition.

I would have expected pseudocode to be:

For Rule 1 with Selection ANY
-Loop 1-x runners
--While selection runner x:
----Evaluate condition 1 for Current Selection (runner x, as Current Selection)
----Evaluate condition 2 for Current Selection (runner x, as Current Selection)
----If ALL conditions met, place bet for runner x; exit and start Loop again from 1
----If ALL conditions NOT met, Loop for next Selection (runner x+1)



However, my logs seem to show that when using ANY within a Condition, the iterative evaluation of ANY happens independently both at the rule level AND within the Condition level.

In other words, pseudocode seems to be:

For Rule 1 with Selection ANY
-Loop 1-x runners
--While selection runner x:
----Evaluate condition 1 for Current Selection (ANY)
------Loop 1-x runners for condition 1
-------While Current Selection Runner x
---------Evaluate condition 1 for Current Selection (runner x, as Current Selection)
----------If Condition met, set Condition1 Met=1 and process next Condition
----------Else Loop for next runner (runner x+1)
------Loop 1-x runners for condition 2
-------While Current Selection Runner x
---------Evaluate condition 1 for Current Selection (runner x, as Current Selection)
----------If Condition met, set Condition2 Met=1 and process next Condition
----------Else Loop for next runner (runner x+1)
----If ALL conditions met, place bet for runner x
----If ALL conditions NOT met, Loop for next Selection (runner x+1
)

Can you please confirm / deny that the flow below is how this would play out?

Automation Rule Evaluation
-Selection is ANY selection
-Iteration 1 for ANY selection evaluation begins
--Start with runner in row 1 as the "betting" selection to test conditions against
----Checking condition 1 for Current Selection (ANY Selection)
------Runner in row 1 meets condition
------Condition 1 met, moving to Condition 2
----Checking condition 2 for Current Selection (ANY Selection)
------Runner in row 1 does not meet condition
------Runner in row 2 does not meet condition
------Runner in row 3 meets condition
------Condition 2 met, moving to Condition 3
----Checking condition 3 for Current Selection (ANY Selection)
------Runner in row 1 does not meet condition
------Runner in row 2 does not meet condition
------Runner in row 3 does not meet condition
------Runner in row 4 meets condition
------Condition 3 met, moving to Condition 4
----No Condition 4, ending Condition evaluation
----All Conditions met
--Bet placed for runner in row 1, as this was the runner being evaluated against conditions


Cheers and thank you so much for all you contribute to this forum!
SomeDude
User avatar
Dallas
Posts: 22673
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

Sorry I couldn't actually understand what you'd put there (which is probably me not the way you've written it), but let me try and clarify with an example in this market
Capture.JPG

Lets assume the rule is applied to the selection in row 3 just to keep that part simple for now

and you have 2 x fixed odds conditions both applied to Nominated ANY selection
one is back price less than 3.4
the other is back price greater than 70

The rule would we able to trigger because 'Swinton' is satisfying the first condition and 'Boasted' is satisfying the second condition

So both conditions don't need to be satisfied by the same selection (each can be satisfied by ANY selection), just as long as both are satisfied at the same time
You do not have the required permissions to view the files attached to this post.
SomeDude
Posts: 28
Joined: Fri Sep 24, 2021 5:32 am

Thank you Dallas! That's a perfect example! It clarifies what's happening and it matches what my logs are telling me. My initial assumption was incorrect on the way ANY works when both as a selection and a condition. I'm glad to have confirmation.

SO... and I hate to ask, but you're the expert here!...
What is the best way for handling a situation when I want to use ANY for the selection (I don't know which runner might meet my conditions) and then evaluate whichever selection is currently the "ANY" selection for betting purposes, and ONLY evaluate that selection, against a number of conditions?

So, for example, let's say that I want to place a straight lay bet on ANY runner that:

- has a lay price greater than 10
- lay price two seconds ago is less than current lay price
- has a last traded price greater than 12

From what you've demonstrated and what I've logged, I can't use the Current Selection (ANY) in the conditions, as potentially all conditions could be met by different runners and a bet subsequently placed even if the selection for betting purposes (the one I wanted to meet the conditions) didn't meet any of the conditions. How would I do this most efficiently? At present, I'm building an identical rule for each runner to ensure only that runner is evaluated against the conditions, e.g.:
Rule 1: Selection Runner 1, Conditions "Current Runner (Runner 1)"
Rule 2: Selection Runner 2, Conditions "Current Runner (Runner 2)"
Rule 3: Selection Runner 3, Conditions "Current Runner (Runner 3)"

Surely, this can't be the best way to do this. It works, but it's incredibly inefficient and it's not hard to have an automation with 100+ rules...which is incredibly difficult to maintain and modify, not to mention (I suspect) a heavy load on the processor to keep up with in an in-play situation.
It would be far more efficient to be able to use: Selection "ANY runner", Condition Selection: "Current Selection for betting purposes". I could then do in 1 rule what would take me 24 rules in a 24 runner race.

Anyway... what's the correct way to approach this problem? I'm fairly certain the experts don't do what I'm doing, lol.

Thank you again for all of your help. A lot of us wouldn't be making progress without your shared knowledge.
User avatar
Dallas
Posts: 22673
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

SomeDude wrote:
Fri Jan 21, 2022 1:40 am
Thank you Dallas! That's a perfect example! It clarifies what's happening and it matches what my logs are telling me. My initial assumption was incorrect on the way ANY works when both as a selection and a condition. I'm glad to have confirmation.

SO... and I hate to ask, but you're the expert here!...
What is the best way for handling a situation when I want to use ANY for the selection (I don't know which runner might meet my conditions) and then evaluate whichever selection is currently the "ANY" selection for betting purposes, and ONLY evaluate that selection, against a number of conditions?

So, for example, let's say that I want to place a straight lay bet on ANY runner that:

- has a lay price greater than 10
- lay price two seconds ago is less than current lay price
- has a last traded price greater than 12

From what you've demonstrated and what I've logged, I can't use the Current Selection (ANY) in the conditions, as potentially all conditions could be met by different runners and a bet subsequently placed even if the selection for betting purposes (the one I wanted to meet the conditions) didn't meet any of the conditions. How would I do this most efficiently? At present, I'm building an identical rule for each runner to ensure only that runner is evaluated against the conditions, e.g.:
Rule 1: Selection Runner 1, Conditions "Current Runner (Runner 1)"
Rule 2: Selection Runner 2, Conditions "Current Runner (Runner 2)"
Rule 3: Selection Runner 3, Conditions "Current Runner (Runner 3)"

Surely, this can't be the best way to do this. It works, but it's incredibly inefficient and it's not hard to have an automation with 100+ rules...which is incredibly difficult to maintain and modify, not to mention (I suspect) a heavy load on the processor to keep up with in an in-play situation.
It would be far more efficient to be able to use: Selection "ANY runner", Condition Selection: "Current Selection for betting purposes". I could then do in 1 rule what would take me 24 rules in a 24 runner race.

Anyway... what's the correct way to approach this problem? I'm fairly certain the experts don't do what I'm doing, lol.

Thank you again for all of your help. A lot of us wouldn't be making progress without your shared knowledge.
I'd do it by applying the rule to 'Every' selection,

Then add your conditions as normal and ensure they point at 'Current' (current selection from Every)

Then add the condition below and that will ensure it only fires on one of the runners
'Number of place bet triggers condition' on market is equal to 0
SomeDude
Posts: 28
Joined: Fri Sep 24, 2021 5:32 am

Thank you Dallas! I hadn't considered Every, as I wasn't quite sure how that worked. I'll give it a go.

Your contributions here are invaluable. Thank you for taking the time to help those of us still trying to figure out this whole trading game. Cheers!
Anbell
Posts: 2004
Joined: Fri Apr 05, 2019 2:31 am

SomeDude wrote:
Sat Jan 22, 2022 5:28 am
Thank you Dallas! I hadn't considered Every, as I wasn't quite sure how that worked. I'll give it a go.

Your contributions here are invaluable. Thank you for taking the time to help those of us still trying to figure out this whole trading game. Cheers!
EVERY works the way you first expect ANY to work
SomeDude
Posts: 28
Joined: Fri Sep 24, 2021 5:32 am

Anbell wrote:
Sat Jan 22, 2022 5:38 am
SomeDude wrote:
Sat Jan 22, 2022 5:28 am
Thank you Dallas! I hadn't considered Every, as I wasn't quite sure how that worked. I'll give it a go.

Your contributions here are invaluable. Thank you for taking the time to help those of us still trying to figure out this whole trading game. Cheers!
EVERY works the way you first expect ANY to work
Yeah... I interpreted EVERY to mean just that, e.g., if the condition was applied to current selection "every", then every single runner would have to meet that condition... so I avoided it.
User avatar
ShaunWhite
Posts: 9731
Joined: Sat Sep 03, 2016 3:42 am

The full explaination of ANY and EVERY is here if you still need it. ->https://www.betangel.com/user-guide/app ... Q2&mw=MzIw# inculding how it affects the number of triggers.
SomeDude
Posts: 28
Joined: Fri Sep 24, 2021 5:32 am

ShaunWhite wrote:
Sun Jan 23, 2022 3:22 am
The full explaination of ANY and EVERY is here if you still need it. ->https://www.betangel.com/user-guide/app ... Q2&mw=MzIw# inculding how it affects the number of triggers.
I had read those rules, but they weren't at all clear to me. I think a great deal more information could be provided in the user guide to make the usage absolutely clear, including examples.
Post Reply

Return to “Support”