Bitbucket is a code hosting site with unlimited public and private repositories. We're also free for small teams!

Close

Technical Machine installation instructions

For a full overview of the program, see http://doublewise.net/pokemon/

Prerequisites

  • gcc version 4.9.0 or newer, with c++ support. Technical Machine makes use of some features in C++11 and C++14 that are not supported in older versions of gcc.
  • Boost. Listed as boost-devel in Fedora repositories. Technical Machine is primarily tested against version 1.53.0.
  • fltk is needed the stand-alone team predictor / builder. It is not needed to actually run the battling AI. Listed as fltk-devel.
  • SCons is used for the build process.

Building (Linux)

  • cd path/to/technical-machine
  • scons. The default target (by simply typing scons) will build all versions of all programs. Various stand-alone parts can be made by typing scons target, where target is what you want to build. In general, the debug version of any target is made by appending "-debug" to the target name. For instance, if you want to just build the core AI, you type scons ai. If you want to only build the debug version, you type scons ai-debug.
  • Fill in server information for the server you want to connect to, as found in "settings/settings.xml".
  • Run the program with ./ai [depth] or ./ai-debug [depth], where depth is an optional value that tells Technical Machine how many turns ahead to look (defaults to 2). The depth can be updated by sending a PM to the bot (if you are a trusted user, set in trusted_users.txt) with the command !depth #.

Build targets

ai
The AI with maximum optimizations. Accepts a single, optional command-line argument, the depth to search. Higher depth means stronger play, but it also takes longer to search. If no value is entered, 2 is assumed. Recommended at 1 through 3. If you are very patient and have a fast computer, Technical Machine can search to a depth of 4 in a reasonable amount of time. If you set the depth of search to 0, Technical Machine moves randomly.
ai-debug
The AI with no optimizations and all asserts. Accepts a single command-line argument as above. Recommended at 1 or 2.
predict
predict-debug
GUI team predictor. Enter in Pokemon already seen and it shows its prediction of the remaining team. If a Pokemon is put into the first slot, it is assumed to be the lead Pokemon. If no Pokemon is put in that slot, no lead stats are used.
test
Runs some tests to verify there are no regressions. Should be run before committing anything.
test-debug
Tests with no optimizations enabled, to verify that optimizations do not change behavior.

Commands

Commands can be sent to Technical Machine on any server it is logged in to (and only apply on that server). It only accepts commands via PMs from trusted users (determined by reading settings/trusted_users.txt).

!challenge
Format is !challenge username
!depth
Format is !depth # (where # represents the new depth as an integer). Sets Technical Machine's depth of search to #. This only applies to future challenges / battles. Existing battles are fixed in their depth.
!join
Format is !join channel_name (with no '#' symbol)
!message
Sends a message to a channel. Format is !message channel_name msg where channel is a one word channel name (with no '#' symbol) and message is any number of words. For channels that may optionally contain spaces, format is !message "channel name" msg
!part
Format is !part channel_name (with no '#' symbol)
!pm
Format is !pm username message where username is a one word username. For usernames that may optionally contain spaces, format is !pm "user name" message
!reload
Reloads all relevant text files. This allows updating TM's set of canned responses, how often it uses those responses, and evaluation constants, for instance.

Recent activity

David Stone

David Stone pushed 3 commits to davidstone/Technical Machine

c63732e - Simplified determination of whether a move is physical or special.
2646188 - Switched to bounded::integer in global_move.
1b41527 - Moved move pp member variable to be private and allow users to get a reference to a const version of it. Added decrement_pp member function ...
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.