FIBS Board backgammon forum

Bots & other tech stuff => TourneyStatsBot => Topic started by: amarganth on February 23, 2005, 12:36:54 PM

Title: TourneyStatsBot - technical usage
Post by: amarganth on February 23, 2005, 12:36:54 PM
Hi players

I would like to explain the technical usage of the new "TourneyStatsBot", a bot who lists some statistical data about tourneys played on FIBS. Currently there are the two finalists of some played tourneys in the database.

The idea and the general usage will explain you adamosad.

Restrictions:Users:
The bot differentiates between three groups of users:Depending of your status, you will receive the following explanations, if you tell "help" to the TourneyStatsBot:

All users:
I understand the following commands:
Ã, list name=<name> [from=<date>] [to=<date>]
Ã, list country=<countryname> [from=<date>] [to=<date>]
Ã, list type=<tourneytype> [from=<date>] [to=<date>]
Ã, list admins
Ã, list types
Ã, help


The list command lists (as expected) tourneys.

If you are an administrator, you will also receive the following lines:
Commands for administrators:
Ã, add <name> rank=<1|2> type=<tourneytype> date=<date> [country=<country>]
Ã, remove <name> rank=<1|2> type=<tourneytype [date=<date>] [country=<country>]


The add command adds a tourney into the database.
The remove command removes a tourney from the database.

If you are a superadministrator, you will also receive the following lines:
Commands for superadministrators:
Ã, addadmin <name> <tourneytype>[,<tourneytype>...]
Ã, removeadmin <name>
Ã, addtype <tourneytype> 'description'
Ã, removetype <tourneytype>
Ã, backup


With this commands, the superadministrators can add and remove tourney administrators and tourneytypes or make a backup of the data after some heavy changes.

As usual, <name> for instance must be replaced with an account name. Options, remarked with [] are optional.

The following formats will be accepted:
Title: TourneyStatsBot - technical usage
Post by: Kari_Grandi on February 23, 2005, 01:34:32 PM
NICE!! Well done Amar and Adam!  :yes:  
Title: TourneyStatsBot - technical usage
Post by: adamosad on February 23, 2005, 02:04:21 PM
Hi everyone,

Firstly i want to thx everyone that helps me with Tourneystatsbotââ,¬â,,¢s idea and especially Amarganth, its creator  :D

As amarganth explains, normal userââ,¬â,,¢s commands are very easy ones (user friendly).
So i think that everyone can use the bot easily. I hope people will start using the bot and made it a success.

The main usage was explained above by Amarganth so i will explain how i input the data and how the administrators must work with the bot.

My sources for the entries were a lot of fibs tournament pages but my main source was fibsleagammon site. Thx to Tomawaky i was able to insert data from 2003 to today.

I decided only to use 1st and 2nd standings and i insert only monthly and season data for the most of the tourneys. For example for fridays3 and minimatches i used monthly data. For league I used season data as it runs every two months.

All tournament owners and some of their tds will have access to the bot to insert their results. i do not think that this is extra work for them, because they have to insert their results once a month or once a longer period. They can do this by using the two administratorââ,¬â,,¢s commands. I hope more of them will like the idea and help us to make the new bot a success.

Anyone who starts hosting a new kind of official tourney can conduct us to give him access to the bot. Of course we will think first if he is a responsible guy and if he will host this tournament for a lot of time.

Finally I want to inform all of you that I used some more data from some special tourneys like postcard and pics ones that probably are died today. I just wanted to insert all tourney data from 2003 to today.

For comments, suggestions and problems, you can write in this new forum. Technical ones can be answered by Amarganth and the others by both of us.  

Title: TourneyStatsBot - technical usage
Post by: Tomawaky on February 23, 2005, 08:21:17 PM
Great JOB  :agree:  
Title: TourneyStatsBot - technical usage
Post by: adamosad on April 03, 2005, 01:12:08 AM
Hi again everyone,

I want to tell you about some new commands.

If you write "help" u will get:

QuoteTourneyStatsBot: This is TourneyStatsBot, a computer program designed
to give informations about official played tourneys.
TourneyStatsBot: NOTE: The TourneyStatsBot service is NOT provided
by the fibs administrators. Do not bother Patti about it.
TourneyStatsBot: I understand the following commands:
TourneyStatsBot: help <command - get help for one of the commands listed
below.
TourneyStatsBot: list - list tourneys, administrators or tourney types.
TourneyStatsBot: hitlist - list the most tourney winners.
TourneyStatsBot: Commands for administrators:
TourneyStatsBot: add - add a tourney to the database.
TourneyStatsBot: remove - remove tourneys from the database.
TourneyStatsBot: addplayer - add a player and his country to the country
table.
TourneyStatsBot: removeplayer - remove a player from the country table.

TourneyStatsBot: listplayers - list all players in the country table.
TourneyStatsBot: Commands for superadministrators:
TourneyStatsBot: addadmin, removeadmin, addtype, removetype, backup,
sql

As you can see, there are 2 new commands: Hitlist and addplayer. The first is for users and the second for administrators.

I will explain both.

Hitlist

This command will give you the TOP 10 list for the best tourney players.
If you want the TOP 20 list, you can just write "hitlist 20"

addplayer

If an administrator try adding a player that his/her country is not in bot's database, the bot will not let this administrator to insert his results.

QuoteTourneyStatsBot: ERR: Player 'XXXXXXXX' not in country

So the admin BEFORE using the usual add command, he must use addplayer command.

If you want to add me, you must write:
"addplayer adamosad cy"
cy is the international 2-digit for Cyprus.

If an admin doesn't know the country of a specific player, he can ask me or amarganth. We will search for him.

Finally, you can use the command help before any other command.

For example:

"Help add"

QuoteTourneyStatsBot: The 'add' command adds tourneys to the database.
TourneyStatsBot: Syntax:
TourneyStatsBot: add <name rank=<1|2 type=<ttype date=<date
TourneyStatsBot: Explanation:
TourneyStatsBot: <name is a playername
TourneyStatsBot: <rank is the rank of the player in this tourney. only 1 or
2 allowed
TourneyStatsBot: <ttype is a tourney type. See 'list types'.
TourneyStatsBot: <date is a date in the format yyyy.mm.dd or yyyy/mm/dd

So if anyone forgets the syntax of a command, he can find it easily.
Title: TourneyStatsBot - technical usage
Post by: adamosad on May 22, 2005, 07:38:21 PM
Hi everyone,

I want to tell you about a new command

chitlist

This command is similar to hitlist but it gives you the best tourney countries instead of the best tourney players.

If you write "chitlist", you will get the TOP 10 list for the best tourney countries.
If you want the TOP 20 list, you can just write "chitlist 20"

Another important difference between the chitlist and hitlist is that hitlist's number must have a value between 1 and 30 but chitlist's number must have a value between 1 and 20. So you can write as a command "hitlist 25" to get the players TOP 25 tourney list but you can't write chitlist 25. This happens because of technical reasons.

I want to thx Amarganth for this new command because it was very difficult for me to find manually the "country" results and the "list country=XX" command gives us unbiased results.(For more info see here (http://www.fibsboard.com/index.php?showtopic=942))