The seek formula allows you to create a description on the kind of seeks you will accept from direct
challenges sent by other players. Seeks not matching your formula will have a seek rejection message automatically
sent to your opponent indicating that your formula does not currently match their seek request.
Seek formulas can be very expressive, and can combine a number of logical and mathematical operators to produce
complex seek preferences such as :
(playing_time_left>5mins or (from="bjork" and time=60mins)) or correspondence
would only accept seeks that are
either correspondence seeks or non-correspondence seeks where you either have more than 5 minutes left in the
current game you are playing, or the seek is from a person with the username "bjork" and she is asking for a
game with initial time set to 60 minutes.
You can change your seek formula using the Seek Formula option in the playing menu at the top of the page (only
available when on the playing page). The default seek formula looks like this:
!playing or (playing_time_left > 15 minutes and (correspondence or playing_correspondence))
This only allows seeks if you are either not actively playing a game in the current game tab, or the game you are
actively playing has more than 15 minutes left on your clock, and either the incoming seek request is for a
correspondence game, or the game you are playing is a correspondence game.
This default rule prevents you receiving seek requests for any type of game if you are low on time in an
actively played game, and prevents receiving seeks for live games when you are already playing a live game. If you
are not low on time, then if you are playing a live game you can still receive correspondence seeks, or if you are
playing a correspondence game then you can receive seeks of any type.
Seek Formula Time Handling
Several seek formula variables deal with time. All time stored in any variable is stored as seconds in order to
avoid confusion on which variables might be minutes or seconds, or indeed hours or days for some longer time
controls. In order to make this convenient , and avoid having to do things like time = 24*60*60
to match 1 day, you can use the time operators of 'm','s','h','d' and 'y' to provide the relevant time unit. For
example etime>=50 days
to match a correspondence game which is estimated to take at least 50
days for both players' moves. time=5m
would match a game with start time of 5 minutes , while
time<1 hour would match any start time below 1 hour. The 'm','s' etc markers are simply converting the time units
into seconds for matching against the seconds based time variables. You could do the same thing with multiplication
but "time=1 year" is much more convenient than "time=365*24*60*60".
The following time markers are valid: m,s,h,d,y,mins,secs,hours,days,years,min,sec,hour,day,year,minutes,seconds
Seek Formula Operator List
The following logical and arithmetic operations are available for use within the seek formula:
- &,&&,and,AND
-
The AND operator returns true if it's left and right arguments are both true. e.g.
rated and blitz
- |,||,or,OR
-
The OR operator returns true if one of or both of it's left or right arguments returns true. e.g.
bullet or blitz
- !,not,NOT
-
The NOT operator negates its argument. e.g.
!playing
- =,==,equals
-
The equality operator returns true if both it's left and right arguments are equal. e.g.
from="bjork"
- <,<=,>=,>
-
Inequality operators. e.g.
time>=5m or (inc>2 and inc<10) and (max_time>0)
- +,-,*,/
-
Arithmetic operators. e.g.
time>2m+20 && inc>time/20 && max_time<20*(inc+2)
Seek Formula Variable List
The current list of variables that can be used in a seek formula are:
- playing
-
true if you are currently playing a game in the active game tab. Note that if you have games you are playing,
but you currently have no game tabs open , or the game you are currently viewing is over, then this will
return false.
- playing_correspondence
-
Similar to the 'playing' variable, but only returns true if the game being played is a correspondence
game. Must be playing an in-progress correspondence game in the currently active game tab to return true.
- playing_live
-
Similar to the 'playing' variable, but only returns true if the game being played is a non-correspondence
game. Must be playing an in-progress non-correspondence game in the currently active game tab to return true.
- playing_time_left
-
If you are actively playing a game (i.e. the selected game tab is an in progress game) this variable will
return the time left in that game. For example:
Example 15.1.
playing_time_left > 5m
will match
situations where you are playing a game with more than 5 minutes left. This can be useful to avoid
distractions when you are running low on time. If the currently selected game tab does not contain an in
progress game or you dont have any game tabs open, this value will return 10 years. This ensures
Example 15.2.
playing_time_left > 5m
would match if you are not currently playing, which is usually
the desired behaviour.
- playing_computer
-
True if the game in the currently active game tab is one you are playing against a computer. This variable
allows you to receive seeks you might not want to receive when playing against a human, but would be happy to
receive when playing against a computer.
- playing_human
-
True if the game in the currently active game tab is one you are playing against a human. Note that
playing_human != !playing_computer
as it is possible for both playing_human and playing_computer to be false
if you are not currently playing a game.
- black
-
The seek requests that the opponent plays as black
- white
-
The seek requests that the opponent plays as white
- nocolour
-
true if the opponent did not request a colour preference, and auto-colour selection will be made.
- autocolour
-
Synonym for nocolour. Set to true if the opponent did not request a colour preference, and auto-colour
selection will be made.
- bullet
-
The seek request is for a bullet time control.
- blitz
-
The seek request is for a blitz time control.
- rapid
-
The seek request is for a rapid time control.
- long
-
The seek request is for a long time control.
- correspondence
-
The seek request is for a correspondence time control.
- computer
-
The seek request is from a computer. Note that currently computers do not send direct seeks, so this variable
is most useful when the seek formula is used to filter the seek list, rather than incoming seek direct
seek requests.
- human
-
The seek request is from a human.
- time
-
The clock start time. Time is in seconds so use the time modifiers such as 'time=5m','time=1hour' etc to
conveniently refer to non-second based values here.
- inc
-
The per move clock increment used in the time control. Set to 0 if no increment is used. Again, this is stored
in seconds, so use time modifiers if you want to specify increment matches in larger than second values for
example,
inc>1 day
- max_inc_time
-
The maximum time the clock is allowed to increase to via per move increments for example:
max_inc_time<(1 day+4 hours)
- etime
-
The estimated total time for the game (i.e. includes time taken for both sides, so a 10 minute game would have
an etime of 20 minutes. This will be calculated using
2*(start time + increment time*40)
,
allowing for the 'max time' truncation if any is set. Time is stored in seconds.
- myetime
-
The estimated total time available for your moves , this is half the etime. See etime for how this value is
calculated.
- direct
-
true if the seek is a direct challenge. This will always be true when filtering incoming direct seeks, but is
useful if you use the seek formula as a filter on the seek list or seek graph, and only want to see direct
seeks there.
- from
-
The name of the opponent creating the seek. Using quotes around any matched name for example:
from="han"
- rating
-
The rating of the opponent in the rating type relevent to this seek.
- rd
-
The rating deviation of the opponent , which is a measure of the reliability of the opponents rating, and also
their recent activity levels. The lower the rd value, the more active, and more reliable the rating, for
example:
rd<40
would indicate a very active user.
- myrating
-
Your rating in the rating type associated with the seek. Useful for relative rather than absolute rating
comparison for example:
rating>=myrating-300
would match only seeks where the seek creator
had a rating no more than 300 points below your own rating.
- ratingdiff
-
ratingdiff is the absolute value of the difference between your rating and the rating of the seek creator in
the relevant rating type. For example, if your rating is 1600 and your opponent's rating is 1400 the
ratingdiff is 200. If your rating is 1400, and your opponent's rating is 1600, the value will also be 200
(i.e. the ratingdiff variable is unsigned). This variable allows concise specifications of relative rating
ranges, so for example you can specify:
ratingdiff<200
as a short cut for
rating-myrating>-200 AND rating-myrating<200
which restricts the acceptible difference
between your rating and the opponent rating to less than 200 rating points.
- rated
-
True if the seek is for a rated game.
- unrated
-
True if the seek is for an unrated game.
Seek Formula as Seek List/Seek Graph Filter
By default the seek formula is only used to filter incoming direct challenges, however the seek list/seek graph
filters also have an option to allow the formula to be used as an additional filter on top of the seek list/graph
filters. Open the seek filters when on the seeks tab to turn this option on. The option is stored in a cookie on the
browser, so will be recalled next time you visit the playing page on the same machine.