#ifndef _COP_H #define _COP_H #include #include "parse.h" struct CopData { bool firstTurn; // Really dirty hack to ensure that we get // two foot mcgruffs and two car mcgruffs in qual round std::vector **coordMap; // nodePair **pureCarMap, **pureFootMap, **carMap, **footMap; std::vector< std::vector > pureCarMap, pureFootMap, carMap, footMap; int N, cN, turnNumber; bool badCop[COPS]; int robberPosGuess; int lastRobberPosGuess; int stallCounter; int robberPosUncert; // Uncertainty on robber's position, in # of steps std::vector myPlan; std::vector votedPlan; int curPos; int validFrom, electedTactician; std::vector< std::vector > santasList; // which robots have betrayed us std::vector smellMap; int lastEvidenceUsed; // History of set of possible robber // positions, using only our own info std::vector > trustedRobPos; // History of set of possible positions // for the robber using info of trusted // cops & our own std::vector > naiveRobPos; std::set lyingCops; // Set of lying cops // History of info from other cops; the info known to be lies gets deleted // [world][index] std::vector > foreignInfo; std::vector< std::vector > tracks; // robber tracks, [world][node] = prob // Cops to be accused next turn std::vector copsToAccuse; std::vector lastAcceptedPlan; std::vector underControl; // other cops I control CopData( int worldSize, int robberNode ); void floyds( int policeNode ); void setLastAcceptedPlan(std::vector& plan, int acceptedAt, int winner ) { lastAcceptedPlan = plan; validFrom = acceptedAt+2; electedTactician = winner; } void processState( World& w ); void processInfo( World& w, std::vector< std::vector > info ); void makePlan( World& w ); std::vector makeMove(World& w); std::vector makeInfo(World& w); void diffuseFrom( int n, World& w ); void verifyFrom( int n, World& w ); std::vector makeVote( World& w, std::vector< std::vector > plans ); void updateRobPos(World &w); std::vector rankPlans(std::vector > &plans, World &w); }; #endif