The Fury of Dracula

The Data

introductionthe rules[the data]faqthe viewthe hunt
courtesy Richard Buckland, John Shepherd, and many tutors

Introduction

The major modules in the “Fury of Dracula” need to communicate, and do so in a controlled way. Since they do not share access to a single memory space, data can’t be passed by sharing in-memory data structures. This page describes how data is transmitted between modules.

The data that needs to be communicated includes:

The game engine passes the game history to the View ADTs which process it, build a game state, and then make parts of the game state available to the AIs (i.e. give a “view” of the game to the AI).

Here’s what that all looks like.

[diagram]

the game architecture … diagram by John Shepherd

Moves (and Messages)

Moves are communicated from an AI to the game engine via the function:

void register_best_play (char *play, player_message message);

The first argument to the function is the player’s move. Each player move is described by a two-character string, which gives the abbreviation of a location on the map. The abbreviations are given in a table below. That is all there is to each move: two characters.

Examples: LO = move to London, CD = move to Dracula’s Castle, NS = move onto the North Sea (presumably en route to somewhere else), etc.

The second parameter to the function is a character string of length up to 99 characters and containing an arbitrary text message. This information can be made available to other players, but since it is plain text, may be difficult to make use of in any meaningful way.

Past Plays

The Hunter AIs use the HunterView ADT to collect information about the game state in order to decide on a move. The Dracula AIs use the DraculaView ADT to collect information about the game state in order to decide on a move. In fact, HunterView and DraculaView are both instances of a more general GameView ADT that manages access to game information. A GameView contains a representation of the current state of the game and provides an interface for interrogating the game state in a controlled way.

The AIs set up a game state by (ultimately) invoking the function:

GameView gv_new (char *past_plays, player_message messages[]);

This function takes two argument:

The most important parameter is past_plays, which is a string representing everything that the players have observed happening in the game so far. It lists all the plays made in the game so far by all players (including Dracula) from the earliest turn (at the start of the string) to most recent turn (at the end of the string). This string is never accessed directly by (non-cheating) AIs; they simply pass it to the GameView and then use the appropriate View interface (either HunterView or DraculaView) to find out about it. Note that the past_plays strings given to the Hunters contain slightly less information than the past_plays string given to Dracula.

Each play is 7 characters long (described below) and separated from any following play by a space, and represents what happened during one turn of the game. Each play begins with a single character representing the player whose turn it was:

For each Hunter play (starting with G, S, H, or M), the player character is immediately followed by 6 characters:

For each Dracula play (starting with D), the player character is immediately followed by 6 characters:

The past_plays string given to Dracula never contains C? or S?, since Dracula always knows exactly where he’s been. It will always contains exact locations for all players (including Dracula).

Sample past_plays strings

After the first 5 turns (i.e. at the end of Round 0):

GBE.... SBR.... HLO.... MCA.... DC?.V..

Godalming moved to Belgrade, Seward is in Brussels, van Helsing is in London, and Mina Harker is in Cadiz. Dracula has planted an immature vampire in whatever location he currently resides.

Same game, after the 6th turn (i.e., after the first turn of Round 1):

GBE.... SBR.... HLO.... MCA.... DSJ.V..
GSJVD..

Godalming has stumbled onto Dracula’s location in Sarajevo, where he has vanquished the immature vampire, and encountered Dracula.

Below are more examples, based on real game play from 15s2. Note that past_plays strings can contain hundreds of moves. Some of the past_plays strings below contain newlines. This is for display purposes only; moves are always separated by a single space character in real past_plays strings.

Samples from Game #0:

The past_plays string at end of round 0, start of round 1, given to Godalming:

GMN.... SPL.... HAM.... MPA.... DC?.V..

The past_plays string then given to Seward:

GMN.... SPL.... HAM.... MPA.... DC?.V..
GLV....

The past_plays string then given to Van Helsing:

GMN.... SPL.... HAM.... MPA.... DC?.V..
GLV.... SLO....

The past_plays string then given to Mina Harker:

GMN.... SPL.... HAM.... MPA.... DC?.V..
GLV.... SLO.... HNS....

The past_plays string then given to Dracula:

GMN.... SPL.... HAM.... MPA.... DZU.V..
GLV.... SLO.... HNS.... MST....

The past_plays string given to Godalming at the start of round 2:

GMN.... SPL.... HAM.... MPA.... DC?.V..
GLV.... SLO.... HNS.... MST.... DC?T...

The past_plays string then given to Seward:

GMN.... SPL.... HAM.... MPA.... DC?.V..
GLV.... SLO.... HNS.... MST.... DC?T...
GIR....

Samples from Game #1:

The past_plays string given to Mina Harker after several rounds:

GMN.... SPL.... HAM.... MPA.... DC?.V..
GLV.... SLO.... HNS.... MST.... DC?T...
GIR.... SPL.... HAO.... MZU.... DCDT...
GSW.... SLO.... HNS.... MFR.... DC?T...
GLV.... SPL.... HAO.... MZU.... DC?T...
GSW.... SLO.... HNS....

The past_plays string given to Dracula after Mina’s move:

GMN.... SPL.... HAM.... MPA.... DGA.V..
GLV.... SLO.... HNS.... MST.... DHIT...
GIR.... SPL.... HAO.... MZU.... DCDT...
GSW.... SLO.... HNS.... MFR.... DKLT...
GLV.... SPL.... HAO.... MZU.... DBCT...
GSW.... SLO.... HNS.... MMR....

Samples from Game #2:

The past_plays string given to Godalming after several rounds:

GED.... SGE.... HZU.... MCA.... DCF.V..
GMN.... SCFVD.. HGE.... MLS.... DBOT...
GLO.... SMR.... HCF.... MMA.... DC?T...
GPL.... SMS.... HMR.... MGR.... DBAT...
GLO.... SBATD.. HMS.... MMA.... DC?T...
GPL.... SSJ.... HBA.... MGR.... DC?T...
GPL.... SSJ.... HBA.... MGR.... DC?T...

The past_plays string given to Dracula after all other hunters have moved:

GED.... SGE.... HZU.... MCA.... DCF.V..
GMN.... SCFVD.. HGE.... MLS.... DBOT...
GLO.... SMR.... HCF.... MMA.... DTOT...
GPL.... SMS.... HMR.... MGR.... DBAT...
GLO.... SBATD.. HMS.... MMA.... DSRT...
GPL.... SSJ.... HBA.... MGR.... DALT...
GPL.... SSJ.... HBA.... MGR.... DMAT...
GLO.... SBE.... HMS.... MMATD..

Table of Locations

Location NameAbbrevLocation IDType
Adriatic SeaASADRIATIC_SEASEA
AlicanteALALICANTELAND
AmsterdamAMAMSTERDAMLAND
AthensATATHENSLAND
Atlantic OceanAOATLANTIC_OCEANSEA
BarcelonaBABARCELONALAND
BariBIBARILAND
Bay of BiscayBBBAY_OF_BISCAYSEA
BelgradeBEBELGRADELAND
BerlinBRBERLINLAND
Black SeaBSBLACK_SEASEA
BordeauxBOBORDEAUXLAND
BrusselsBUBRUSSELSLAND
BucharestBCBUCHARESTLAND
BudapestBDBUDAPESTLAND
CadizCACADIZLAND
CagliariCGCAGLIARILAND
Castle DraculaCDCASTLE_DRACULALAND
Clermont-FerrandCFCLERMONT_FERRANDLAND
CologneCOCOLOGNELAND
ConstantaCNCONSTANTALAND
DublinDUDUBLINLAND
EdinburghEDEDINBURGHLAND
English ChannelECENGLISH_CHANNELSEA
FlorenceFLFLORENCELAND
FrankfurtFRFRANKFURTLAND
GalatzGAGALATZLAND
GalwayGWGALWAYLAND
GenevaGEGENEVALAND
GenoaGOGENOALAND
GranadaGRGRANADALAND
HamburgHAHAMBURGLAND
Ionian SeaIOIONIAN_SEASEA
Irish SeaIRIRISH_SEASEA
KlausenburgKLKLAUSENBURGLAND
LeipzigLILEIPZIGLAND
Le HavreLELE_HAVRELAND
LisbonLSLISBONLAND
LiverpoolLVLIVERPOOLLAND
LondonLOLONDONLAND
MadridMAMADRIDLAND
ManchesterMNMANCHESTERLAND
MarseillesMRMARSEILLESLAND
Mediterranean SeaMSMEDITERRANEAN_SEASEA
MilanMIMILANLAND
MunichMUMUNICHLAND
NantesNANANTESLAND
NaplesNPNAPLESLAND
North SeaNSNORTH_SEASEA
NuremburgNUNUREMBURGLAND
ParisPAPARISLAND
PlymouthPLPLYMOUTHLAND
PraguePRPRAGUELAND
RomeROROMELAND
SalonicaSASALONICALAND
SantanderSNSANTANDERLAND
SaragossaSRSARAGOSSALAND
SarajevoSJSARAJEVOLAND
SofiaSOSOFIALAND
St Joseph and St MarysJMST_JOSEPH_AND_ST_MARYSLAND
StrasbourgSTSTRASBOURGLAND
SwanseaSWSWANSEALAND
SzegedSZSZEGEDLAND
ToulouseTOTOULOUSELAND
Tyrrhenian SeaTSTYRRHENIAN_SEASEA
ValonaVAVALONALAND
VarnaVRVARNALAND
VeniceVEVENICELAND
ViennaVIVIENNALAND
ZagrebZAZAGREBLAND
ZurichZUZURICHLAND