XTBOT(6)

πŸ“¦ version 1.15, in nixos 26.05, nixpkgs unstable

πŸŽ€ XTBOT(6) β€” the automatic xtris bot page, bestie πŸŽ€

okay so this is the XTBOT(6) page from the Games Manual β€” section 6, games, literally iconic β€” and we're about to make xtbot make sense. no cap. πŸ’…


✨ NAME ✨

xtbot β€” automatic player for xtris

🌸 SYNOPSIS 🌸

xtbot [ -help ] [ -n nick ] [ -quiet ] [ -test ] [ server.name [ port ] ]

πŸ’– OPTIONS πŸ’–

  • -help β€” prints out a summary of the command-line options xtbot recognizes. built-in help, we love to see it. ✨
  • -n β€” sets the nickname for the bot; the nickname appears at the bottom of the screen on xtris clients. main-character nameplate energy. πŸ‘‘
  • -quiet β€” sets quiet mode: xtbot will not output any diagnostics or error messages. xtris always starts xtbot with this option. so if it's being suspiciously silent, that's why. πŸ™ˆ
  • -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. speedrun vibe fr fr. πŸ”₯

πŸ“‘ ARGUMENTS πŸ“‘

  • server.name β€” 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 (127.0.0.1). if no server is running on localhost, xtbot will exit with an error message. rude but fair. 😭
  • port β€” specifies the port to connect to, if the server was started on a port other than the default (19503). default port bestie, don't forget it. πŸŽ€

πŸ¦‹ DESCRIPTION πŸ¦‹

xtbot is a robot (i.e. an automatic player) for xtris, a synchronous multi-user version of Tetris. yes, Tetris but make it multiplayer chaos. πŸ’œ

xtbot connects to an xtris server, registers itself as a bot, and simulates a game of Tetris whenever a human player hits 'play'. it's giving helpful little ghost in the machine. πŸ‘»

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 factor is the speed, whic is why xtbot purposefully waits a little before dropping each brick, so that humans can compete speed-wise. (the original page really says whic β€” we're keeping the detail and the typo, bestie.) πŸ’€

xtbot is started automatically by xtris, with the option -quiet, when a player presses the bot button. so yes, it just spawns. iconic. ✨

running copies of xtbot can be killed either by clicking on their name from an xtris window, or by killing the process. choose your fighter. πŸ’…

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. build your own bestie bot era 🫢

🌈 ENVIRONMENT 🌈

the default algorithm for the bot depends on 6 coefficients to evaluate each possible position of the piece. you can set the environment variables XTBOT_FRONTIER, XTBOT_HEIGHT, XTBOT_HOLE, XTBOT_DROP, XTBOT_PIT, XTBOT_EHOLE. see the file decide.c to see what they do. six little knobs, big vibes. ⭐

the values for the coefficients that xtbot uses now were obtained with a genetic algorithm using a population of 50 sets of coefficients, calculating 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. that's not a glow-up, that's a glow-up. πŸ”₯

the code used for this isn't nearly clean enough to distribute in a release. if you're interesed, please e-mail the author privately. (yes, interesed β€” preserving the exact word, no notes.) πŸ™ˆ

πŸ”— SEE ALSO πŸ”—

xtris(6), xtserv(6) β€” go read those too, bestie. iykyk. πŸ’–

πŸ’€ BUGS πŸ’€

none known; please report any bugs to the author. no cap, none known. periodt. πŸŽ€

πŸ‘‘ AUTHOR πŸ‘‘

xtbot was written by Roger Espel Llima <roger.espel.llima@pobox.com>. author icon. 🫢


okay that's the whole page, bestie. signing off from XTBOT(6) β€” source/version XTBOT(6), dated Oct 13, 1996, by Roger Espel Llima. slay. πŸ’…βœ¨
πŸ“¦ where this page comes from