예제 #1
0
        public Shepherd(
            int numberOfSeenShepherds,
            int numberOfSeenSheep,
            int numberOfNeuronsInHiddenLayer,
            int numberOfHiddenLayers,
            EPerceptionType perceptionType,
            bool randomizeNeuralNet)
            : this()
        {
            NumberOfSeenShepherds = numberOfSeenShepherds;
            NumberOfSeenSheep     = numberOfSeenSheep;
            perception            = PerceptionFactory.GetPerception(perceptionType);

            Brain = NeuralNetsFactory.GetMultiLayerNeuralNet(new NeuralNetParameters()
            {
                InputLayerSize       = (numberOfSeenShepherds + numberOfSeenSheep) * 2 + 2,
                OutputLayerSize      = NEURAL_NET_OUTPUT_LAYER_SIZE,
                HiddenLayerSize      = numberOfNeuronsInHiddenLayer,
                NumberOfHiddenLayers = numberOfHiddenLayers
            });

            if (randomizeNeuralNet)
            {
                Brain.Randomize();
            }
        }
예제 #2
0
 public PrintedCard Represent(Card card, IPerception perception, bool archives)
 {
     this.card       = card;
     this.perception = perception;
     this.archives   = archives;
     card.ObserveInformation(UpdateFace);
     Rotate();
     return(this);
 }
 public void OnPlayerPercieve()
 {
     if (CurrentNpc != null && CurrentNpc is IPerception)
     {
         IPerception perceivingNpc = CurrentNpc as IPerception;
         CurrentLocationInformation = perceivingNpc.Perceive();
         _player.NpcsEngaged.Add(_currentNpc);
     }
 }
 /// <summary>
 /// handle the perception to event in the view
 /// </summary>
 public void OnPlayerPerceive()
 {
     if (CurrentNpc != null && CurrentNpc is IPerception)
     {
         IPerception perceiveNpc = CurrentNpc as IPerception;
         CurrentLocationInformation = perceiveNpc.Perceive();
         _player.NpcsEngaged.Add(_currentNpc);
         _player.UpdateJournalStatus();
     }
 }
예제 #5
0
        public Shepherd(
            int numberOfSeenShepherds,
            int numberOfSeenSheep,
            EPerceptionType perceptionType,
            NeuralNet brain)
            : this()
        {
            NumberOfSeenShepherds = numberOfSeenShepherds;
            NumberOfSeenSheep     = numberOfSeenSheep;
            perception            = PerceptionFactory.GetPerception(perceptionType);

            Brain = brain;
        }
예제 #6
0
 public static Sprite ChooseFace(Card card, IPerception perception)
 {
     if (perception.CanSee(card.Information))
     {
         return(Resources.Load <Sprite>("Images/Cards/" + card.FaceupArt));
     }
     else if (card.Faction.Side == Side.CORP)
     {
         return(CORP_BACK);
     }
     else
     {
         return(RUNNER_BACK);
     }
 }
예제 #7
0
 public CardPrinter(GameObject parent, IPerception perception, CardZoom zoom)
 {
     this.raw        = new RawCardPrinter(parent);
     this.perception = perception;
     this.zoom       = zoom;
 }
예제 #8
0
 public BoardParts(GameObject board, IPerception perception, CardZoom zoom)
 {
     this.board      = board;
     this.perception = perception;
     this.zoom       = zoom;
 }
예제 #9
0
 public CardZoom(GameObject board, IPerception perception)
 {
     this.perception = perception;
     blanket         = CreateBlanket(board);
     rawCardPrinter  = new RawCardPrinter(blanket);
 }