State makePlan(State realSpaceGoal) { ROS_INFO("Making a plan. State amount is %d.", (int) pomdp.states.size()); // Calculate the best next state to get to that goal. calculateReward(realSpaceGoal, pomdp.num_lookahead); return getMostLikelyState(); }
void VisibilityManager::login(CreatureObject* creature) { //info("Logging in " + creature->getFirstName(), true); Reference<PlayerObject*> ghost = creature->getSlottedObject("ghost").castTo<PlayerObject*>(); if (ghost != NULL) { decreaseVisibility(creature); Locker locker(&visibilityListLock); if ((ghost->getVisibility() > 0) && (!visibilityList.contains(creature->getObjectID()))) { //info("Adding player " + String::valueOf(creature->getObjectID()) + " to visibility list.", true); visibilityList.put(creature->getObjectID(), creature); } locker.release(); if (ghost->getVisibility() >= TERMINALVISIBILITYLIMIT) { // TODO: Readjust after FRS implementation. int reward = calculateReward(creature); addPlayerToBountyList(creature, reward); } } }