taiplayer.html - vaccinewars - be a doctor and try to vaccinate the world
 (HTM) git clone git://src.adamsgaard.dk/vaccinewars
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
       taiplayer.html (2856B)
       ---
            1 <?xml version="1.0" encoding="UTF-8"?>
            2 
            3 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
            4  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
            5 
            6 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
            7 
            8 <head>
            9 <title>Adding computer-controlled players</title>
           10 <meta charset="utf-8"/>
           11 </head>
           12 
           13 <body>
           14 <h1>Adding computer-controlled players</h1>
           15 
           16 <p>Multiplayer games of dopewars can be made a little more interesting by
           17 introducing computer-controlled, or AI, players. These players will join
           18 a dopewars server, and to all intents and purposes will behave like normal
           19 human players - they will deal in drugs in an attempt to make a fortune,
           20 they will encounter the cops, you can spy on them, and they will shoot at
           21 you if you give them the chance!</p>
           22 
           23 <p>To start a computer-controlled player, all you need is the standard dopewars
           24 binary. Run it as<br />
           25 <tt><b>dopewars -c</b></tt><br />
           26 and it will attempt to connect to the server and port specified in the
           27 <a href="configfile.html">configuration files</a> (or the local host, if none
           28 is specified). Alternatively, you can specify server and port with suitable
           29 <a href="commandline.html">command line options</a>. Since an AI player
           30 takes its game settings from the server it connects to, no other options in
           31 the configuration files will take effect, with the exception of the 
           32 <a href="configfile.html#AITurnPause">AITurnPause</a> option, which sets the
           33 pause in seconds between turns.</p>
           34 
           35 <p>Once started and connected to the server, the AI player will choose a
           36 suitable name for itself and start playing. It will continue to play until
           37 its game finishes - i.e. it is killed or runs out of time - at which point
           38 the program will finish and drop you back to the command prompt. The program
           39 will display information to let you know what the AI player is doing within
           40 the game as it goes. Note that the program will pause for five seconds (or
           41 whatever you have set AITurnPause to be) before jetting to a new location -
           42 this is to simulate the time it takes a human player to choose which drugs
           43 to buy and to press all the requisite keys; it also gives other players a
           44 fighting chance of spotting the computer sitting still in any one location
           45 for a few seconds!</p>
           46 
           47 <p>If a computer player is attacked by the cops or another player, it will
           48 defend itself if it can, and attempt to run if necessary. During normal
           49 play it will also attempt to "blend in" with the other players by hurling
           50 rather pathetic insults at them... you are free to
           51 <a href="https://github.com/benmwebb/dopewars/blob/develop/src/AIPlayer.c">edit
           52 the code</a> of the AI player to give these insults a little more "punch".</p>
           53 
           54 <hr />
           55 <ul>
           56 <li><a href="index.html">Main index</a></li>
           57 </ul>
           58 <p>
           59   Last update: <b>05-12-2020</b><br />
           60   Valid <a href="http://validator.w3.org/check/referer">XHTML 1.1</a>
           61 </p>
           62 </body>
           63 </html>