The Rules
Ver. 8.01 - 22 Dec 2001
Season#9

1.Introduction
Tennis Pro Tournament is a Tennis Simulation PBeM (Play By e-Mail). It runs free, as a hobby; no price has to be payed, no prizes for winners: it runs just for fun.

When you sign up the game, you have to build up a player, defining how he will play.

Like in real tennis, matches are played by "sets"; sets are played by "games". Every match is won by the player that wins 2 sets (in the "Regular" Tournaments; 2 on 3 sets rule) or 3 sets (in the "Grand Slam" Tournaments; 3 on 5 sets rule). Every set is won by the player that wins 6 games having at least 2 games advantage, or wins 7 games (tie-break).

Your player has, for every match, a certain number (1000 for matches played with 2 on 3 sets rule, 1600 for matches played with 3 on 5 sets rule) of available points (called FPs, Fitness Points) to be played plus a maximum of 200 bonus FPs due to the playing surface (that are doubled in Grand Slam Tournament matches, for a maximum of 400 FPs) minus a maximum of 200 FPs due to "weariness" for past matches minus his flexibility parameter; when you build up your player you will determine exactly how many FPs he plays every game. The player that plays more FPs in one game wins that game. In case of tie, the game will be won by player who serves in that game. Players serve alternatively game by game; the first game service is assigned to best ranked player.

If your player finishes a match with less than 500 left FPs, he's got a "weariness" penality in next macth (of the same Tournament) equal to (500 - left FPs) / 5. More he'll suffer another penalty equal to one half of the one suffered in the last macth. So: Pen_in_match_n = Pen_in_match_n-1 / 2 + (500 - left_FPs_in_match n-1) / 5

2.The Orders
You determine how many FPs your player plays in a certain game depending on match current status; match current status is completely defined by these "Internal-Variables":

ML - Match Length
It may assume these values:
3 if match is played with 2 on 3 Sets rule
5 if match is played with 3 on 5 Sets rule

TRN - Tournament Turn
It may assume these values:
FINAL if current match is a Tournament Final
SEMI if current match is a Tournament Semifinal
NOTRN else

TOURNAMENT - Tournament Number
It assumes the value corresponding to number of current Tournament:
1 for Rome
2 for Johannesburg
...
22 for Masters


WG - Won Games (in current Set)

LG - Lost Games (in current Set)

GD - Game Difference, equal to WG-LG

GN - Game Number (in current Set), equal to WG+LG+1

TWG - Total Won Games (since beginning of Match)

TLG - Total Lost Games (since beginning of Match)

WS - Won Sets

LS - Lost Sets

SD - Set Difference, equal to WS-LS

SN - Set Number, equal to WS+LS+1

BD - Break Difference, equal to difference between won Games on opponent service and lost Games on own service in current Set

LFP - Left Fitness Points (in Current Match)

SUR - Surface
It may assume these values:
EARTH (= 0.8)
GRASS (= 1.2)
HARD (= 1.1)
SYNTHETIC (= 0.9)
MASTERS (= 1.0)

OW - Opponent weariness
It may assume these values (in decreasing order):
VHIGH (or 4) if opponent left FPs are less than 50
HIGH (or 3) if opponent left FPs are between 50 and 100
AVG (or 2) if opponent left FPs are between 100 and 250
LOW (or 1) if opponent left FPs are between 250 and 400
NO (or 0) if opponent left FPs are more than 400

OWN(m,svc) - Average of played FPs in last m games serving/returning; svc may assume these values:
SVC to consider only serving games
RTR to consider only returning games
BOT to consider all games (not including Tie Breaks)
ALL to consider all games (including Tie Breaks)
Note: Tie Breaks are considered neither serving nor returning games.

OPP(m,svc) - Average of opponent played FPs in last m games serving/returning; svc may assume these values:
SVC to consider only serving games (referred to who's writing orders)
RTR to consider only returning games (referred to who's writing orders)
BOT to consider all games (not including Tie Breaks)
ALL to consider all games (including Tie Breaks)
Note: Tie Breaks are considered neither serving nor returning games.

S - Serving or returning
It may assume these values:
SVC = serving games
RTR = returning games
TIE = Tie Breaks
Note: Tie Breaks are considered neither serving nor returning games.

MOW = Match Point for Own player
It may assume these values:
YES (or 1) = if there's a condition of Match Point for own player
NO (or 0) = if there's not a condition of Match Point for own player

MOP = Match Point for Opponent player
It may assume these values:
YES (or 1) = if there's a condition of Match Point for opponent player
NO (or 0) = if there's not a condition of Match Point for opponent player

SOW = Set Point for Own player
It may assume these values:
YES (or 1) = if there's a condition of Set Point for own player
NO (or 0) = if there's not a condition of Set Point for own player
Note: a Match Point is also a Set Point.

SOP = Set Point for Opponent player
It may assume these values:
YES (or 1) = if there's a condition of Set Point for opponent player
NO (or 0) = if there's not a condition of Set Point for opponent player
Note: a Match Point is also a Set Point.

BON = Service (or returning) Bunus in current Game

ON - Opponent Name
Its value is the name of your current opponent (the one used in official tables, including eventual underscores).
This is a special variable you HAVE to declare you want to play with when signing up (or at beginning of a new Season). If you declare you want to play with the ON, you are allowed to use the ON variable against every opponent best ranked than yours. Else if you play against an opponent worst ranked than yours that declared NOT to want to play with the ON variable, match will be played without the ON variable (i.e., ON will assume a null value for both players!). List of players wanting to use the ON is public.

OPPSC - Opponent Service Capability
Returning the Opponent "Service Capability" (between 0 and 100).

OPPSB - Opponent Surface Bonus
Returning the Opponent Surface Bonus (between 0 and 100 if 2 on 3 sets match or between 0 and 200 if 3 on 5 sets match).

You can also define your own variables (user-defined-variables), using the keyword VAR.
You can use no more than 30 user-defined variables.

You build your player, determining how he will play, using "rows" of conditions with this syntax (square brackets "[]" means the argument is not mandadory):

[Played-FPs] [User-Defined-Variable-Assignment] [":" Row]

where:
Played-FPs = Expression

Expression = "(" Expression ")" {alg-op Expression}
Expression = Internal-Variable {alg-op Expression}
Expression = User-Defined-Variable {alg-op Expression}
Expression = Constant {alg-op Expression}
Expression = ROUND "(" Expression ")"
Expression = TRUNC "(" Expression ")"

alg-op     = "*" (=product)
alg-op     = "/" (=ratio)
alg-op     = "+" (=sum)
alg-op     = "-" (=difference)
alg-op     = "%" (=module operator)

ROUND (Expression) returns the nearest integer of Expression
TRUNC (Expression) returns the nearest lower integer of Expression

User-Defined-Variable-Assignment = User-Defined-Variable = Expression 
                                   {,User-Defined-Variable = Expression}

Row = Condition {boolean-op Condition}

Condition  = "(" Condition ")"
Condition  = Condition boolean-op Condition
Condition  = Expression logical-op Expression {logical-op Expression}

boolean-op = ","
boolean-op = ";"
(where "," means logical AND and ";" means logical OR;
 there's no preference in OR and AND order of execution:
 they are executed sequentially)

logical-op = "<"
logical-op = "<="
logical-op = "="
logical-op = ">="
logical-op = ">"
logical-op = "<>"

User-Defined-Variable must be declared at beginning of instructions with this syntax:
VAR Name_Variable = Constant {,Name_Variable = Constant}
All User-Defined-Variable are considered real values variables.

Note 1: *|/|% operators will be applied before +/- operators, as in usual algebrical rules. % operator is the module operator: a % b returns the rest of the division a/b (where a and b are rounded to the nearest integer).
Note 2:You can insert comments in your orders using keyword REM at beginning of row: rows beginning with REM will be not taken in consideration.

Every game (but tie breaks) you can play no more than:

MAXFPs if LFP is greater than EDGE

MINFPs+(MAXFPs-MINFPs)*LFP/EDGE if LFP is lower than EDGE

where:
EDGE   = 500
MAXFPs = 160
MINFPs =  80

No limit will be applied in tie breaks.

Examples:

100 : WG>1, SUR=grass
means your player will play 100 FPs if he won more than one game in current set playing on the grass;

LFP*0.1 : OPP(2,SVC)<=70, S=SVC, 0<=SD<=1
means your player will play 10% of left FPs if opponent average played FPs in last 2 games in which your player was serving was less equal than 70 and your player is serving in current game and set difference is currently between 0 and 1. Notice the symbol "." as decimal point.

10/(GN+1): GN % 3=1
means your player will play 10/(game number + 1) FPs in games number 1, 4, 7... and so on.

100: GN>10;(SN=3,ML=3)
means your player will play 100 FPs is Game number in current Set is greater than 10 OR it's being played the 3rd Set in a 2 on 3 Sets Match.

VAR A=0
10 [A=SN+1] : LG-WG>0
means play 10 FPs and assign to Internal-Variable A the value SN+1 if you're loosing the set (lost games - won games greater than 0).

VAR A=1
[A=A*2] : A<64, SN=1
means assign A*2 to Internal-Variable A if A is less than 64 and you're playing first set. The assignment is maden AFTER condition evaluation.

VAR A=1
A [A=A*2] : A<64, SN=1
means play A FPs, assign A*2 to Internal-Variable A if A is less than 64 and you're playing first set. The assignment is maden AFTER condition evaluation and AFTER playing FPs.

Played FPs will be truncated to lower nearest integer.
Example:
GN/5 : SN=1
will play, in 1st set, 0 till 4th game (included), 1 till 9th game (included), and so on.

When you build a player you write a list of rows (each row cannot exceed 256 characters); during the macthes, every game rows will be evaluated sequentially. Once encountered a row with a true condition:
1-if it's a row like this:
User-Defined-Variable-Assignment [":" Row]
assigment will be performed and evaluation will continue with the following row.
2-if it's a row like this:
Played-FPs [User-Defined-Variable-Assignment] [":" Row]
eventual assigment will be performed and evaluation will stop playing Played-FPs in current game. If not such a row will be encountered, 0 FPs will be played. You can avoid this if, for example, the last row of your orders is like this:
10:
This way you're sure that at least this row will indicate the match current status (since there're not conditions). If you, for example, put this row at the beginning of your orders, your player will ALWAYS play 10 FPs, and next rows will be never evaluated.

There are four types of surfaces where Tournaments are played on:
1-Earth (Clay)
2-Grass
3-Hard
4-Synthetic
Coaches have to choose how to split the 200 bonus FPs on the various surfaces, giving their players more chances to win over certain surfaces. For example, one can choose to split those 200 points this way:
20/140/30/10, i.e. Earth:20, Grass:140, Hard:30, Synthetic:10.
This would mean that player has 1020 available FPs for matches played on Earth (1640 if it's a Grand Slam Tournament), 1140 for those ones played on Grass (1880 if it's a Grand Slam Tournament), 1030 for those ones played on Hard surface (1660 if it's a Grand Slam Tournament) and 1010 for those ones played on Synthetic (1620 if it's a Grand Slam Tournament).
Players may change their surfaces preferences at beginning of every new Season.

In every game there will be a FPs bonus for who serves and a FPs bonus for who returns. Bonuses will be calculated this way:
Service Bonus=(10+15*SC/100*FP/250)*SFC
Return Bonus=(15*(1-SC/100)*FP/250)*SFC
where SC is a "Service Capability" between 0 and 100 assigned by his coach to the player at beginning of Season (together with Surface Preferences), FP is equal to left FPs if left FPs are lower than 250 else it's equal to 250 (=edge of weariness) and SFC is a surface multiplier (Earth=0.8 - Grass=1.2 - Hard=1.1 - Synthetic=0.9).
In tie breaks service and return bonuses will not be considered. In case of tie in played FPs, tie break will be won by who has more left FPs; in case of further tie it will be won by who used less rows in his orders (VAR declaration rows will be not taken in consideration); else it will be won by who should have been serving in the 13th game. Bonus values will be rounded to nearest integer.

Your player is also characterized by a "flexibility" parameter that measures his ability in changing rithm to the match. So if played FPs (not included service bonus) in a game is greater (or lower) than flexibility relating to game before played FPs, he will supper a FPs penality equal to the difference minus the flexibility. So, total spent FPs will be:
played_FPs_in_game_n if abs(played_FPs_in_game_n - played_FPs_in_game_n-1)<= Flexibility

played_FPs_in_game_n + (abs(played_FPs_in_game_n - played_FPs_in_game_n-1) - Flexibility) else
.


No errors check in your orders will be performed. In case of errors in your orders, your player will play in unpredictable way. Anyway you can change your orders whenever you want during the Season.

3.How to Sign Up
To Sign Up the game, simply e-mail me at paciales@tin.it, providing these informations:
Subject:Tennis Sign Up
In the message indicate:
Your Name
Your e-mail address
Your Country and Age (facultative)
Your Player Name (max 10 characters, please)
Your surfaces preferences (default values: 25/25/25/25)
Your Service Capability (default value: 50)
Your ON preference (default value: Not using ON)
Your player flexibility (default value: 100)

[Tournaments (max 8) you want to partecipate to (see below at item 4) using the TPTSIGNUP/ENDSIGNUP keywords (facultative)] (attention: this rule between square brackets "[" is NOT applied in Season#9, since all players will play ALL Tournaments)

Your Player line-up (orders) (rows in txt format) using the STARTTPT/ENDTPT keywords


Example:
Subject: Tennis Sign Up Name: Mario Rossi E-Mail: rossi@abc.xy Country/Age: Italy/30 Player Name: Bjorn Surfaces: 20/15/40/25 Service: 75 I do (not) want to use the ON variable Flexibility: 85 [TPTSIGNUP Bjorn Rome Naples Bercy Key_Biscaine Queen's Barcelona Stuttgart Milan ENDSIGNUP] (attention: this part between square brackets "[" is NOT needed in Season#9) STARTTPT VAR A=0, B=10 REM TpT Test Orders 5 [A=A+1] : ML=3, OPP(1,BOT)<=5 [B=B+A] : SN<=2, A<10 85 : WS+LS<=2, SD>=0, -1<=GD<=2, LFP>=500 REM Default value 10+B : ENDTPT

Signing up is related to a Season. After every Season you will be asked to eventually confirm your participation. Please, be sure to know the rules when you Sign Up. Your player line-up will be the proof you know them. For every kind of question, please, contact me. Suggestions and ideas are welcome.

4.Season and TpT Standing
Every Season is 20 Tournaments long (16 Regular ones and 4 Grand Slam ones) plus 2 "invitations" ones and, in every Tournament, points will be assigned to players for the general TpT standing. Tournaments are clustered in 5 types and points assigned to winner depend of "rank" of Tournament. There's only one Tournament of a certain rank played on a certain surface. Points assigned to winner (other players points are halved turn by turn; so, for example, finalist will have one half of winner points, semifinalist one half of finalist and so on) are summarized in this table (where N is the TpT total number of signed up players when Tournament runs and Nmax the maximum of N during the Season).

Tournament Rank Earth Grass Hard Synthetic TpT Points to winner
Grand Slam Paris Wimbledon US_Open Melbourne 15 x N
Top Rome Queen's Frankfurt Stockholm 12,5 x N
Major Montecarlo Brisbane Moscow Stuttgart 10 x N
Open Barcelona Sydney Key_Biscaine Bercy 7,5 x N
Challengers Naples Johannesburg Hong_Kong Milan 5 x N
Grand Slam Cup 12 x Nmax
Masters 12 x Nmax


Plus, for every match, winner will have a bonus equal to 1% of beated opponent TpT points in TpT standing.
Points gained in a Tournament will last within Tournament will rerun the Season after.

Tournaments will be played in this order:

1-Rome
2-Johannesburg
3-Moscow
4-Melbourne
5-Barcelona
6-Queen's
7-Hong_Kong
8-Stuttgart
9-Paris
10-Sydney
11-Frankfurt
12-Milan
13-Montecarlo
14-Wimbledon
15-Key_Biscaine
16-Stockholm
17-Naples
18-Brisbane
19-US_Open
20-Bercy

21-Grand Slam Cup (on random surface, played among the 16 best classified players in Grand Slam Tournaments with 2 on 3 sets rule)

22-Masters (no surface bonus, played among the 8 best players with two Round Robin Groups of 4 players each with 2 on 3 sets rule, semifinals with 3 on 5 sets rule and final with 3 on 5 sets rule)

Every coach can handle a limited number of players (limit is fixed in 3 for Season#9).

Attention: next rule will NOT be applied at Season#9:
[Every player can play only 8 regular Tournaments plus 4 Grand Slam ones and, if qualified, the invitations ones. At beginning of Season coaches have to plan their players Season indicating what Tournament they want to take part to. It can be done exactly as in signing up phase, sending to me a message indicating (between the TPTSIGNUP/ENDSIGNUP keywords) the list of 8 Tournament that player wants to play (everybody is authomatically signed up to Grand Slam ones). For example:

TPTSIGNUP player_name
Rome
Hong_Kong
Bercy
Key_Biscaine
Queen's
Moscow
Stuttgart
Frankfurt
ENDSIGNUP
There're two limitations:
1-no more than two players coached by the same coach can take part to the same Tournament.
2-first 16 ranked players (at beginning of Season) can take part to no more than one Challengers Tournament. Of course, suggestion is for best ranked players to sign up to high rank Tournament and for newbies to sign up to low rank ones.
If coach does not express his preferences (or violates above limitations), his players will be assigned randomly to 8 Tournaments each with the above limitations (or will take part only to allowed Tournaments and will be randomly assigned for the other ones).]


Tournaments are played every week or every two weeks; anyway, date of next Tournament will be communicated every time. At the end of the Season some time could be needed for eventual rules change and game improvement. Season will start when enough players are signed up.

Apart Masters Tournament, Tournaments are played, as in real tennis, with the KO formula, from First Turn to the Final. All the matches of the Tournament (from First Turn to the Final) are played together.

During the Season you can, in every moment, change your orders (changing the way of playing of your player), simply sending to me your new line-up:

Subject: Tennis Change LineUp

In the message (you can also attach a txt file; in this case be sure TO USE NO ENCODING MODE) indicate:

STARTTPT Player_Name
New Line Up
ENDTPT

Please, use the "official" name assigned to your player (including eventual underscores; if requested, it's possible to use a secret user-id rather than own player's name) and remember to use the STARTTPT/ENDTPT keywords: they'll be used in an authomatic orders loader. Example:

Subject: Tennis Change LineUp

Message corp (or attached not encoded txt file):
STARTTPT Bjorn
VAR A=1
10+A [A=A+LG*5]: GN<=7
50+A: GN>7
ENDTPT
Eventual dummy players, built by me, the commissioner, will not be able to change their way of playing for the whole Season (in order not to have advantage by knowing other players orders).

As you can Sign Up in every moment during the Season, you can quit the game in every moment, sending to me this message:
Subject: Tennis Quit
In the message indicate:
Your Player Name

During the Season you'll receive via e-mail the results of Tournaments (in html/zipped format) and the details of played matches (in txt/zipped format) in order to eventually study your opponents way of playing. The web page will be updated too with Tournaments results and Players Overall Standings.

Played matches detailed report has the following format:
for every played match, the following header:
Match# xx                                   
               Player A-       Player B     <-Players Names
Rows                 44-              4     <-Number of rows of orders
FPs                1015-           1030     <-Total available FPs
and, for every played game:
  1    1            28 (28)-                12 ( 2)      1-0
  ^    ^             ^  ^                    ^  ^         ^
Set Game    Played FPs  Bonus       Played FPs  Bonus     Current Set
              Player A  Player A      Player B  Player B  score
        Bonus included          Bonus included

Eventual complaints must be sent within two days (starting from the day after Tournament run) since Tournament has been run and must be related to:
-misapplication of present rules;
-malfunctions of TpT orders processor;
-misloading of Change LineUp messages (not due to network problems; orders must be received within 6.00 am, italian time, of Tournament day).

In case of accepted complaint, Tournament will be rurun. It's left to me not rerunning the Tournament if Semifinals and Final Table will not be affected by Tournament rerunning, though.

At present game is opened to a maximum of 128 players. Depending on the success of the game there's not a fixed expiring date. At the ending of every Season it will be decided if the game will continue.



Return to Main Page



Last updated: 22/12/01 by Alex Paci