Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages


home | help
XTBOT(6)			 Games Manual			      XTBOT(6)

       xtbot - automatic player	for xtris

       xtbot [ -help ] [ -n nick ] [ -quiet ] [	-test ]	[ [	port ]

       -help  Prints out a summary of the command-line	options	 xtbot	recog-

       -n     Sets the nickname	for the	bot;  the nickname appears at the bot-
	      tom of the screen	on xtris clients.

       -quiet Sets quiet mode: xtbot will not output any diagnostics or	 error
	      messages.	 xtris always starts xtbot with	this option.

       -test  Runs the bot in test mode: xtbot will not	connect	to a server or
	      show the game in progress, but will just simulate	 16  games  as
	      fast as it can and print stats on	the number of lines it did and
	      the number of bricks it played.

	      Specifies	the machine on which an	xtris  server  (xtserv)	 runs.
	      xtbot will connect to that server, and add itself	to the game.

	      If the server is not specified, xtbot will attempt to connect to
	      a	server on localhost (  If no	server is  running  on
	      localhost, xtbot will exit with an error message.

       port   Specifies	the port to connect to,	if the server was started on a
	      port other than the default (19503).

       xtbot is	a robot	(i.e an	automatic player)  for	xtris,	a  synchronous
       multi-user version of Tetris.

       xtbot connects to an xtris server, registers itself as a	bot, and simu-
       lates a game of Tetris whenever a human player hits 'play'.

       The current version of xtbot uses a  pretty  good  decision  algorithm,
       which  usually  does several thousand lines before losing, when playing
       on its own.  When playing against a bot,	though,	the main limiting fac-
       tor  is the speed, whic is why xtbot purposefully waits a little	before
       dropping	each brick, so that humans can compete speed-wise.

       xtbot is	started	automatically by xtris,	with the option	'-quiet', when
       a player	presses	the 'bot' button.

       Running	copies of xtbot	can be killed either by	clicking on their name
       from an xtris window, or	by killing the process.

       It is fairly easy to adapt xtbot	to make	your own bots  based  on  your
       favorite	 decision  algorithms.	 For this the easiest way is to	change
       the decision function in	decide.c while keeping the rest	of  the	 bot's
       skeleton	 (in  xtbot.c).	  See  the  comments in	decide.c, decide.h and
       xtbot.h for details about the interface between these.	Alternatively,
       the  protocol  between the client and the server	is described in	detail
       in the file PROTOCOL, so	you can	make completely	independent bots.

       The default algorithm for the bot depends on 6 coefficients to evaluate
       each possible position of the piece.  You can set the environment vari-
       XTBOT_EHOLE.  See the file decide.c to see what they do.

       The  values for the coefficients	that xtbot uses	now were obtained with
       a genetic algorithm using a population of 50 sets of coefficients, cal-
       culating	16 generations in about	20 hours on 20-odd Sparc workstations.
       This improved the average number	of lines from 10,000 to	about  50,000.
       The code	used for this isn't nearly clean enough	to distribute in a re-
       lease. If you're	interesed, please e-mail the author privately.

       xtris(6), xtserv(6)

       None known; please report any bugs to the author.

       xtbot was written by Roger Espel	Llima <>.

Roger Espel Llima		 Oct 13, 1996			      XTBOT(6)


Want to link to this manual page? Use this URL:

home | help