This wiki is archived and useful information is being migrated to the main bzflag.org website

Difference between revisions of "BZRobots"

From BZFlagWiki
Jump to: navigation, search
(See Also)
Line 7: Line 7:
 
BZRobots requires that you have already configured and are running an instance of [[BZFS]], that allows one or more bots (using the -botsPerIP setting). Also, BZRobots is a "headless" client (i.e. there are no graphics, it is only text-based), so if you want to watch your bots in action, you will also need to join as an observer or player using the BZFlag client.
 
BZRobots requires that you have already configured and are running an instance of [[BZFS]], that allows one or more bots (using the -botsPerIP setting). Also, BZRobots is a "headless" client (i.e. there are no graphics, it is only text-based), so if you want to watch your bots in action, you will also need to join as an observer or player using the BZFlag client.
  
=Getting Started: Building=
+
=Quick Start: Building=
 
===Linux/OS X===
 
===Linux/OS X===
The BZRobots client (and support for C++ bots) will by default as a standard part of the bzflag trunk build. However, if you want to build Pythong bots, you will need to run ./configure with the option --enable-bzrobots-python (and of course have the necessary dependencies)
+
The BZRobots client (and support for C++ bots) will by default as a standard part of the bzflag trunk build. However, if you want to build Python bots, you will need to run ./configure with the option --enable-bzrobots-python (and of course have the necessary dependencies)
  
 
===Windows===
 
===Windows===
 
Open the bzrobots solution, then build the bzrobots and testbot projects.  
 
Open the bzrobots solution, then build the bzrobots and testbot projects.  
  
=Getting Started: Running=
+
=Quick Start: Running=
 +
(Note: This quick start assumes that you will be testing bzrobots from within the build directory, have already run 'autogen.sh', 'configure', and 'make' and have not run 'make install')
 
===Linux/OS X: Shared Library [.so]===
 
===Linux/OS X: Shared Library [.so]===
(Note: Due to the use of libtool, the TestRobot.so is in the .libs directory)
+
(Due to the use of libtool, the binary TestRobot.so is in the .libs directory)
 
  # cd bzflag/src/bzrobots
 
  # cd bzflag/src/bzrobots
  # ./bzrobots -team red robot@localhost .libs/TestRobot.so
+
  # ./bzrobots -team red sobot@localhost .libs/TestRobot.so
  
 
===Linux/OS X: Python [.py]===
 
===Linux/OS X: Python [.py]===
 
  # cd bzflag/src/bzrobots
 
  # cd bzflag/src/bzrobots
  # ./bzrobots -team red robot@localhost ../../bots/python/StalkBot.py
+
# ln -s .libs/bzrobot_pyext.so ./bzrobot_pyext.so
 +
  # ./bzrobots -team red pybot@localhost ../../bots/python/TestRobot.py
 +
 
 +
===Linux/OS X: LUA [.lua]===
 +
# cd bzflag/src/bzrobots
 +
# ./bzrobots -team red luabot@localhost ../../bots/lua/bzbot.lua
 +
 
  
 
===Windows: Shared Library [.dll]===
 
===Windows: Shared Library [.dll]===
 
  # cd bzflag
 
  # cd bzflag
  # ./bzrobots -team red robot@localhost testbot.dll
+
  # bzrobots.exe -team red dllbot@localhost testbot.dll
 +
 
 +
===Windows: LUA [.lua]===
 +
# cd bzflag
 +
# bzrobots.exe -team red luabot@localhost bots\lua\bzbot.lua
  
 
=See Also=
 
=See Also=
Line 36: Line 47:
  
 
[[BZRobots/History]] - Some of the history behind BZRobots
 
[[BZRobots/History]] - Some of the history behind BZRobots
 
[[BZRobots/Protocol]] - Description of the internal protocol used in BZRobots
 

Revision as of 09:02, 14 August 2009

About BZRobots

(Note that the following information applies to the BZRobots in the upcoming BZFlag 3.0 release)

BZRobots is a programmable computer player client that is compatible with the BZFS server. It is designed to be an artificial intelligence training and development tool that operates under the BZFlag platform.

BZRobots requires that you have already configured and are running an instance of BZFS, that allows one or more bots (using the -botsPerIP setting). Also, BZRobots is a "headless" client (i.e. there are no graphics, it is only text-based), so if you want to watch your bots in action, you will also need to join as an observer or player using the BZFlag client.

Quick Start: Building

Linux/OS X

The BZRobots client (and support for C++ bots) will by default as a standard part of the bzflag trunk build. However, if you want to build Python bots, you will need to run ./configure with the option --enable-bzrobots-python (and of course have the necessary dependencies)

Windows

Open the bzrobots solution, then build the bzrobots and testbot projects.

Quick Start: Running

(Note: This quick start assumes that you will be testing bzrobots from within the build directory, have already run 'autogen.sh', 'configure', and 'make' and have not run 'make install')

Linux/OS X: Shared Library [.so]

(Due to the use of libtool, the binary TestRobot.so is in the .libs directory)

# cd bzflag/src/bzrobots
# ./bzrobots -team red sobot@localhost .libs/TestRobot.so

Linux/OS X: Python [.py]

# cd bzflag/src/bzrobots
# ln -s .libs/bzrobot_pyext.so ./bzrobot_pyext.so
# ./bzrobots -team red pybot@localhost ../../bots/python/TestRobot.py

Linux/OS X: LUA [.lua]

# cd bzflag/src/bzrobots
# ./bzrobots -team red luabot@localhost ../../bots/lua/bzbot.lua


Windows: Shared Library [.dll]

# cd bzflag
# bzrobots.exe -team red dllbot@localhost testbot.dll

Windows: LUA [.lua]

# cd bzflag
# bzrobots.exe -team red luabot@localhost bots\lua\bzbot.lua

See Also

BZRobots/API - A list of the methods in the BZRobots API

BZRobots/Ideas - Community suggestions for and enhancements changes for BZRobots

BZRobots/RoboCode_Changes - For those coming from RoboCode, a list of differences between the RoboCode and BZRobots API

BZRobots/History - Some of the history behind BZRobots