For the twist phase of the programming contest, the BDK includes a "twist" variant of each tool, in addition to the original content.
The BDK provides the following executables, in addition to the original tools:
- tw-server : runs a game; the twist variant of server.
- tw-no-op-cop and tw-no-op-robber : cop and robber bot-brains suitable for use with tw-server; the twist variants of no-op-cop and no-op-robber. Although these bot-brains never offer themselves on the market or accuse other cops, the messages they send are always correct if they find themselves in such situations. This means that the cops are suitable for use with replay.
- tw-judge-cop : the cop brain used in the regular season to judge entries.
- tw-judge-robber : the robber brain used in the regular season to judge entries.
- tw-friday : a completely credulous cop bot that tries to orchestrate a chase for the robber.
- tw-show-cop and tw-show-robber : wraps a given cop/robber bot-brain with the GUI interface; the twist variants of tw-show-cop and tw-show-robber.
The replay and mtee programs work for both the original and twist games.The tw-no-op-robber bot-brain is like the original no-op-robber, except that it implements the twist robber actions.
The tw-no-op-robber builds each message to send as follows:
|
| register-msg | Registers as the robber with the name specified by the --name command-line flag (defaults to "TwNoOpRobber"). | inform-msg | Produces no informs. | plan-msg | Produces an empty plan. | vote-msg | Orders the vote so that plans from players whose names match the robber's name (except the last character; see Player Names) are listed after other players' votes, and the order otherwise matches the world-skeleton order. | bribe-msg | Offers no bribe. | move-msg | Constructs a move that leaves the bot where it currently is (according to the most recent world message). Constructs an empty bribe, if possible. If it finds itself in a situation where it mush push, it picks a cop and picks one of the cops neigbors, and pushes the cop to that neigboring edge, regardless of whether or not that pushes the cop onto itself. |
|
The tw-no-op-cop bot-brain is like the original no-op-cop, except that it provides empty informs, and it implements scoundrel actions.
The tw-no-op-cop builds each message to send as follows:
|
| register-msg | Registers a cop with the name specified by the --name command-line flag (defaults to "TwNoOpCopX") and with the cop type specified by the --type flag (defaults to "cop-car"). | inform-msg | Produces no informs. | plan-msg | Produces an empty plan. | vote-msg | Same as no-op-cop. | move-msg | Same as no-op-cop. | scoundrel inform-msg | Produces no informs. | scoundrel plan-msg | Produces an empty plan. | scoundrel vote-msg | Same as for vote-msg. |
|
The tw-mcgruff bot-brain is like the original mcgruff, but it also supports a new --turn or -# flag. Provide a world number after the flag, and the bot-brain will offer itself for bribes after the given world number. If the robber bribes the tw-mcgruff bot-brain, then tw-mcgruff starts prefers to follow scoundrel plans instead of clean-cop plans. It still only looks at the most recent plans and only follows one step from that plan.
The tw-mcgruff builds each message to send as follows:
|
| register-msg | Registers a cop with the name specified by the --name command-line flag (defaults to "TwMcGruffX") and with the cop type specified by the --type flag (defaults to "cop-car"). | inform-msg | Same as the original no-op-cop. | plan-msg | Produces an empty plan. | vote-msg | Same as mcgruff. | move-msg | Looks only at the most recent winning plan(s); if the cop finds a legal move for any bot that it controls in the next world, it takes the move for the bot. Otherwise, the cop constructs a move that leaves each bot where it currently is (according to the most recent world message). If the cop is a scoundrel, it looks first in the most recent winning scoundrel plan, and then in the most recent winning cop plan. If the -# or --turn command-line flag specified a world that is equal to or less than the current world number, the cop sends turncoat: otherwise, it sends straight-arrow:. The cop never makes any accusations. | scoundrel inform-msg | Produces no informs. | scoundrel plan-msg | Produces an empty plan. | scoundrel vote-msg | Same as for vote-msg. |
|
The tw-gui-robber and tw-gui-cop programs work in essentially the same way as the original variants, but with new actions.
In addition to the player icons of the original map, the twist map includes special colors and shapes for known dirty cops and slave cops:
Legend Additions: |
| Slave cop on foot | | | Slave cop in car | | Dirty cop on foot | | | Dirty cop in car | | Slave dirty cop on foot | | | Slave dirty cop in car | | My slave cop on foot | | | My slave cop in car | | My dirty cop on foot | | | My dirty cop in car | | My slave dirty cop on foot | | | My slave dirty cop in car |
|
Dirty (brown) icons never appear in the map of a clean cop. They appear only in the maps of the robber and dirty cops.
The robber GUI now includes actions for inform, planning, etc., just like the cop GUI. In addition, the robber GUI includes an action for the bribe state:
Check the Try to Bribe Cops box to offer a bribe, or leave it unchecked to offer no bribes.
If no cop bot-brains have offered to accept bribes, then the robber's move action will include each clean cop bot. Pick a "push" move for one of the cops:
If one or more cop bot-brains are willing to accept a bribe, then the bribable bot-brains are listed through a set of checkboxes at the bottom of the action panel. Check any number of the boxes to bribe the corresponding cop bot-brains:
If a cop is bribed, then it shows up for the robber's future planning and voting actions.
The cop GUI now lets you offer to accept bribes, accuse other cop brains of bribery, and control multiple cop bots (if you correctly accuse another brain of bribery).
Specifically, the action for a cop move can include multiple slave cop-bots, in addition to the bot-brain's original non-slave bot. The action panel also includes a Turncoat box; check the box to offer to accept bribes (on the robber's next turn or any future turn). Finally, the move action includes a check box for each opponent cop bot-brain; check a box to accuse the corresponding bot-brain of bribery.
If the GUI bot-brain is bribed, then it presents actions on both odd- and even-numbered worlds. In the even-numbered worlds, the state names are prefixed with "r_" to indicate scoundrel actions:
- Version 5 is the first twist version.
- Version 6
- Fixed bug in tw-robber-gui where it requested a push when a cop had been bribed already and no other cops are available for bribing. The correct behavior is to allow no pushes and no bribes.
- Adjusted tw-server to resolve multiple currect accusations of the same bot-brain, as in the revised spec.
- Fixed bug in tw-cop-gui where a smell was displayed only for a cop bot-brain's original bot, instead of for all bots controlled by the bot-brain.
- Version 7
- Added tw-judge-cop, tw-judge-robber, and tw-friday.
- Version 8
- Fixed a bug in the server so that slave cops are no longer filtered out of messages