GPL About Home

Other Project

Project Agent Smith  (Illusions, Mr. Anderson.)

Objective:

Artificial Agent :: To provide a stand-alone BZFlag (tank game) client for the primary purpose of bending the rules of the "Matrix" (the BZFlag game environment) and for the secondary purpose of developing and testing primitive AI (Artificial Intelligence).

Project output should include software mirror, design documentation and operating instructions where necessary.

Description:

Agent Smith has been designed and constructed, from first principles, to be an automated Linux BZFlag cheat client.

Agent Smith (originally "Mr Smith") started out as a two dimensional experiment; as a BZFlag game client written from scratch to be overtly efficient and also as a targeted and malicious killer able to instantly destroy any player by game alias. Agent Smith was first inspired by the program bzdeath.c as written by "The Russian Code Molester", and a lack of available open source cheat clients despite cheat players regularly visiting the public game servers.

Agent Smith's incredible game powers stem from BZFlag's core design which declares that most game control is off-loaded from the server and onto the client. The result of this design "feature" is best described in the words of The Russian Code Molester; "bzflag [bzflag.org] is multiplayer 3D tank battle game, a bugfest and a cheaters heaven. bzflag listens on at least two tcp ports, one port feeding us the bzfs [bzflag server] version and reconnect port, and the other one where the real fun begins. force feeding these ports with some magic fairy powder can make bzfs go insane and eat itself." -- security professionals would recognise this behaviour a "client-side input validation vulnerability", and not just at the protocol layer.

Agent Smith operates by joining the target game server as a real player. What most BZFlag regulars won't know is that all data for all players is circulated to all clients, in a proprietary protocol, as a constant stream of "messages". Agent Smith takes advantage of this information leakage, by waiting for the target game player to appear in the game world with a set of player co-ordinates (X, Y and Z values). Once the target appears, Agent Smith enters the game, appearing immediately behind and automatically facing him. Agent Smith then proceeds to shoot. At this point it does not matter what the target does (jump, fall, teleport, turn, etc), Agent Smith will always follow the target in a manner that allows him to stay behind the target and in range for the ongoing gun fire.

For regular players being targeted by Agent Smith, the result is plain malicious. Every time the target appears, Agent Smith appears, shoots (exploding the target) then disappears again, awaiting the target to re-appear. For cheat players, however, the result is nothing short of hilarious. As cheat players have limited game rules enforced, so does Agent Smith. As cheats fly, lurch and jump about, so too does Agent Smith. And even when lag allows the cheating target to get behind Agent Smith, the cheat finds that he is unable to shoot Smith, and ultimately unable to prevent Smith from finding his way behind the cheat player once more.

Since version 0.9 was developed in 2003, the BZFlag protocol has changed, preventing Agent Smith from joining modern BZFlag game servers. Agent Smith has been published here as both a museum piece, and a platform for future development. For those interested in reviving Smith as a player harassment tool, the proprietary BZFlag protocol is published at the home site, while the source code for Smith is provided below and would require minimal modification to re-animate.

The value in Agent Smith as a development platform has historically been overlooked. The BZFlag game environment is ideal for primitive AI development, as it includes all of the fundamental building blocks; food (good flags), toxins (bad flags), objects to navigate (the map), fight (shoot) and flight (move and avoid) components. The game arena comes complete with an optional objective component - that being to retrieve enemy flags - with the additional opportunity of community, via teams. The multi-threaded Smith then makes a unique development platform, in that all client driven game controls, such as connectivity and messaging, have been taken care of in the primary thread, leaving the payload thread to perform any AI tasks. Combine this with the ability for the developer to transparently cohabit the virtual environment as either a free-floating and non-interactive observer, or a fully interactive actor, then it suddenly seems difficult to find a more useful platform for low neuron density experimentation, before having to resort to either robotics or commercial quality virtualisation.

Included in the pictures and downloads, below, are some of the other widgets created or modified during the Agent Smith development cycle. Of particular note is the "bmp2bzw" (tool by Trepan) algorithm alteration that was proposed, and later added to the tool, for better conversion from bitmap images to 3D BZFlag world maps. One output from the improved bmp2bzw tool was the Mr Potatoe Head level, also included below. Unfortunately the modified bmp2bzw has been lost to antiquity, though in December 2004 this functionality was reported to have been added to "bzmapper".

Thanks to Rob Dartnell for providing the 50 lines of Smith vector code that allowed the October 2003 payload to behave so maliciously.

Due to its effectiveness as an AI development platform, a drastic upgrade of Agent Smith has commenced as at October 13, 2005. Most of Smith will be redeployed through the integration of the Midnight Code libraries which, while currently being developed, already provide better status management, and will ultimately manage the BZFlag protocol.

Agent Smith represents one step in an evolution of AI experiments to be carried out at Midnight Code. Advanced experiments will be performed on real-world devices (i.e. UAV's), and in context-less non real-time and non interactive environments (i.e. the WWW).

As at May 2006, the Smith code is still awaiting Midnight Code library support. The socket library is written, but the raw UDP and TCP sockets have not yet been tested. It will be some time before the current BZFlag protocol is incorporated into the Midnight Code library suite. Once it has been incorporated, however, interesting facilities become possible - such as CHAOS nodes negotating cluster entry via BZFlag servers amongst other oddities.

Screen Shots:

The following screen shots show the software or hardware developed for this project, in action;
BZflag Map - Mr Potatoe Head, shocked
Mr Potatoe Head is shocked
BMP2BZW algorithm for Mr Potatoe Head map
BMP2BZW algorithm proposal

Code:

The following code (source, binaries, patches, etc) have been developed or mirrored for this project;

Links:

The following links have been identified as relevant to this project;

Activity:

This project was initiated on Saturday, the 5th of April 2003. Its last recorded activity stamp is Thursday, the 11th of May 2006.