private void Start() {

        //init communcation channels 
        textCommChannel = CommunicationChannelFactory.Make2WayTextChannel() as TextCommunicationChannel;
        oneWayCommChannel = CommunicationChannelFactory.MakeOneWayTextChannel() as OneWayTextCommunication;
        roomExitCommChannel = CommunicationChannelFactory.MakeRoomExitPathChannel() as RoomExitPathCommChannel;
        oneWayTimedComm = CommunicationChannelFactory.MakeOneWayTimedChannel() as OneWayTimedCommChannel;
        stillnessTimedComm = CommunicationChannelFactory.MakeTimedStillnessChannel() as StillnessTimedCommChannel;

        //init object mover
        objectMover = ObjectMover.CreateObjectMover();

        playerCurrentCoords = player.MazeCellCoords;

        //start out not in communcation
        aiCommState = AICommunicationState.NotInCommuncation;
        aiAlignmentState = AIAlignmentState.Neutral;

        //initialize list of possible actions (for each state)
        InitializeActionLists();

        roomsRequestedIn = new Dictionary<IntVector2, bool>();

        rng = new System.Random();
    }
Exemple #2
0
 private void StateTransition(bool responseWasPositive)
 {
     numberOfInfractions += (responseWasPositive ? -1 : 1);
     if (numberOfInfractions <= 2 && numberOfInfractions >= -2)
     {
         aiAlignmentState = AIAlignmentState.Neutral;
     }
     else if (numberOfInfractions < -2)
     {
         if (numberOfInfractions <= -6)
         {
             aiAlignmentState = AIAlignmentState.VeryFriendly;
             SingleHallwayEnding();
         }
         else
         {
             aiAlignmentState = AIAlignmentState.Friendly;
         }
     }
     else if (numberOfInfractions > 2)
     {
         if (numberOfInfractions >= 6)
         {
             aiAlignmentState = AIAlignmentState.VeryHostile;
             CircleMazeEnding();
         }
         else
         {
             aiAlignmentState = AIAlignmentState.Hostile;
         }
     }
 }
Exemple #3
0
    private void Start()
    {
        //init communcation channels
        textCommChannel     = CommunicationChannelFactory.Make2WayTextChannel() as TextCommunicationChannel;
        oneWayCommChannel   = CommunicationChannelFactory.MakeOneWayTextChannel() as OneWayTextCommunication;
        roomExitCommChannel = CommunicationChannelFactory.MakeRoomExitPathChannel() as RoomExitPathCommChannel;
        oneWayTimedComm     = CommunicationChannelFactory.MakeOneWayTimedChannel() as OneWayTimedCommChannel;
        stillnessTimedComm  = CommunicationChannelFactory.MakeTimedStillnessChannel() as StillnessTimedCommChannel;

        //init object mover
        objectMover = ObjectMover.CreateObjectMover();

        playerCurrentCoords = player.MazeCellCoords;

        //start out not in communcation
        aiCommState      = AICommunicationState.NotInCommuncation;
        aiAlignmentState = AIAlignmentState.Neutral;

        //initialize list of possible actions (for each state)
        InitializeActionLists();

        roomsRequestedIn = new Dictionary <IntVector2, bool>();

        rng = new System.Random();
    }
 public GenericTextInterchange(AIAlignmentState state) : base(state) { }
 public AiPlayerInterchange(AIAlignmentState state) {
     aiState = state;
     expectedResponse = new PlayerResponse();
 }
 public AiPlayerInterchange(AIAlignmentState state)
 {
     aiState          = state;
     expectedResponse = new PlayerResponse();
 }
Exemple #7
0
 private void CircleMazeEnding()
 {
     ResizeMaze(new IntVector2(3, 3), new IntVector2(0, 0), new Action <Maze>(m => m.GenerateCircleMaze()));
     aiAlignmentState = AIAlignmentState.VeryHostile;
     reactToPlayer    = true;
 }
 public GenericTextInterchange(AIAlignmentState state) : base(state)
 {
 }
 public PathInterchange(AIAlignmentState state, PlayerResponse expected, bool firstInterchange)
     : base(state, expected, firstInterchange) {   }
 public PathInterchange(AIAlignmentState state) : base(state) {   }
Exemple #11
0
 public static string GetEndingMonologue(AIAlignmentState state)
 {
     return(GetAllTextByPath("ending/" + state.ToString() + "/ending_monologue_standard"));
 }
 public TouchCornersInterchange(AIAlignmentState state, PlayerResponse response) : base(state, response)
 {
 }
 public PathInterchange(AIAlignmentState state, PlayerResponse expected, bool firstInterchange)
     : base(state, expected, firstInterchange)
 {
 }
 public PathInterchange(AIAlignmentState state, PlayerResponse expected) : base(state, expected)
 {
 }
 public PathInterchange(AIAlignmentState state) : base(state)
 {
 }
 public AiPlayerInterchange(AIAlignmentState state, PlayerResponse expected, bool firstInterchange)
 {
     aiState          = state;
     expectedResponse = expected;
     isFirst          = firstInterchange;
 }
 public AiPlayerInterchange(AIAlignmentState state, PlayerResponse expected)
 {
     aiState          = state;
     expectedResponse = expected;
 }
 public AiPlayerInterchange(AIAlignmentState state, PlayerResponse expected) {
     aiState = state;
     expectedResponse = expected;
 }
 public AiPlayerInterchange(AIAlignmentState state, PlayerResponse expected, bool firstInterchange) {
     aiState = state;
     expectedResponse = expected;
     isFirst = firstInterchange;
 }
 private void StateTransition(bool responseWasPositive) {
     numberOfInfractions += (responseWasPositive ? -1 : 1);
     if (numberOfInfractions <= 2 && numberOfInfractions >= -2) {
         aiAlignmentState = AIAlignmentState.Neutral;
     }
     else if (numberOfInfractions < -2) {
         if (numberOfInfractions <= -6) {
             aiAlignmentState = AIAlignmentState.VeryFriendly;
             SingleHallwayEnding();
         }
         else {
             aiAlignmentState = AIAlignmentState.Friendly;
         }
         
     }
     else if (numberOfInfractions > 2) {
         if (numberOfInfractions >= 6) {
             aiAlignmentState = AIAlignmentState.VeryHostile;
             CircleMazeEnding();
         }
         else {
             aiAlignmentState = AIAlignmentState.Hostile;
         }
     }
     
 }
 public PathInterchange(AIAlignmentState state, PlayerResponse expected) : base(state, expected) {   }
 public LockPlayerInRoomInterchange(AIAlignmentState state) : base(state) {  }
 public TouchCornersInterchange(AIAlignmentState state, PlayerResponse response) : base(state, response) {   }
 public StayStillInterchange(AIAlignmentState state) : base(state)
 {
 }
 private void SingleHallwayEnding() {
     ResizeMaze(new IntVector2(1, 10), new IntVector2(0, 0));
     aiAlignmentState = AIAlignmentState.VeryFriendly;
     reactToPlayer = true;
 }
 private void CircleMazeEnding() {
     ResizeMaze(new IntVector2(3, 3), new IntVector2(0, 0), new Action<Maze>(m => m.GenerateCircleMaze()));
     aiAlignmentState = AIAlignmentState.VeryHostile;
     reactToPlayer = true;
 }
Exemple #27
0
 private void SingleHallwayEnding()
 {
     ResizeMaze(new IntVector2(1, 10), new IntVector2(0, 0));
     aiAlignmentState = AIAlignmentState.VeryFriendly;
     reactToPlayer    = true;
 }
 public StayStillInterchange(AIAlignmentState state) : base(state) { }
 public static string GetEndingMonologue(AIAlignmentState state) {
     return GetAllTextByPath("ending/" + state.ToString() + "/ending_monologue_standard");
 }
 public LockPlayerInRoomInterchange(AIAlignmentState state) : base(state)
 {
 }