Example #1
0
 private void LogClusterDecision(CommandCenter c, CommandCArgs e)
 {
     if (Enabled && Started)
     {
         StrW.WriteLine(e.GetStringData());
     }
 }
 private void LogHumanMove(CommandCArgs e)
 {
     if (PlayerMode != 0)
     {
         CCLog(this, e);
     }
 }
Example #3
0
 private void LogCommand(CommandCenter c, CommandCArgs e)
 {
     if (Enabled)
     {
     }
     if (Started)
     {
     }
 }
Example #4
0
 private void LogNodeDecision(CommandCenter c, CommandCArgs e)
 {
     if (Enabled)
     {
     }
     if (Started)
     {
     }
 }
Example #5
0
 private void LogStart(CommandCenter c, CommandCArgs e)
 {
     if (Enabled)
     {
         RoundMoves = "";
         Started    = true;
         StrW       = new StreamWriter(path, true);
         StrW.WriteLine(Environment.NewLine + "Game Start");
     }
 }
Example #6
0
 private void LogPlayer(CommandCenter c, CommandCArgs e)
 {
     if (Enabled)
     {
         if (Started)
         {
             StrW.WriteLine("Player: " + e.GetIntArrayData()[0]);
         }
     }
 }
Example #7
0
        private void LogGeneral(CommandCenter c, CommandCArgs e)
        {
            if (Enabled)
            {
                StreamWriter SW = new StreamWriter(path, true);

                SW.Write(CC.ToString() + Environment.NewLine);

                SW.Flush();
                SW.Close();
            }
        }
Example #8
0
 private void LogString(CommandCenter c, CommandCArgs e)
 {
     if (Enabled)
     {
         try
         {
             StreamWriter STemp = new StreamWriter(path, true);
             STemp.WriteLine(e.GetStringData());
             STemp.Flush();
             STemp.Close();
         }
         catch { }
     }
 }
Example #9
0
        private void LogEnd(CommandCenter c, CommandCArgs e)
        {
            if (Enabled)
            {
                if (Started)
                {
                    RoundMoves = "";

                    StrW.WriteLine("Game End" + Environment.NewLine);
                    Started = false;
                    SwapState();
                    StrW.Flush();
                    StrW.Close();
                }
            }
        }
Example #10
0
        private void LogWeights(CommandCenter c, CommandCArgs e)
        {
            if (Enabled && !Started)
            {
                StreamWriter SW = new StreamWriter(path, true);

                string[][] TempWeights = e.GetString2DArrayData();
                for (int i = 0; i < TempWeights.Length; i++)
                {
                    for (int k = 0; k < TempWeights[i].Length; k++)
                    {
                        SW.WriteLine(TempWeights[i][k]);
                    }
                }

                SW.Flush();
                SW.Close();
            }
        }
Example #11
0
        private void LogMove(CommandCenter c, CommandCArgs e)
        {
            if (Enabled)
            {
                if (Started)
                {
                    if (RoundMoves.Length != 0)
                    {
                        RoundMoves += ", ";
                    }

                    try
                    {
                        RoundMoves += e.GetIntArrayData()[1] + ": " + CommandNames[e.GetIntArrayData()[0]];
                    }
                    catch (IndexOutOfRangeException)
                    {
                        StrW.WriteLine("Error: The Command Names array did not match with the decision numbers");
                    }
                }
            }
        }
Example #12
0
        public void EndRound(int Score, int UnweightedScore)
        {
            Running = false;
            if (PlayMode == 0)
            {
                LC.FinalizeRound(Score);
            }
            CommandCArgs score = new CommandCArgs(new int[] { UnweightedScore });

            Result(this, score);
            EndGame(this, null);

            if (PlayMode == 0)
            {
                RunCount++;
                if (RunCount == LogLength)
                {
                    RunCount = 0;
                    LogNodes(false);
                }
            }
        }
Example #13
0
 private void LogResult(CommandCenter c, CommandCArgs e)
 {
     if (Enabled)
     {
         if (Started)
         {
             StrW.WriteLine(RoundMoves);
             int Res = e.GetIntArrayData()[0];
             if (Res > 0)
             {
                 StrW.WriteLine("Win: " + Res);
             }
             else if (Res < 0)
             {
                 StrW.WriteLine("Loss: " + Res);
             }
             else
             {
                 StrW.WriteLine("Tie: " + Res);
             }
         }
     }
 }
Example #14
0
 private void LogMode(CommandCenter c, CommandCArgs e)
 {
     if (Enabled)
     {
         if (Started)
         {
             StrW.Write("Mode: ");
             int mode = c.GetPlayMode();
             if (mode == 0)
             {
                 StrW.WriteLine("Learning");
             }
             else if (mode == 1)
             {
                 StrW.WriteLine("Playing");
             }
             else if (mode == 2)
             {
                 StrW.WriteLine("User Input");
             }
         }
     }
 }
Example #15
0
 private void LogOperators(CommandCenter c, CommandCArgs e)
 {
     if (Enabled)
     {
     }
 }
Example #16
0
 private void LogDataSources(CommandCenter c, CommandCArgs e)
 {
     if (Enabled)
     {
     }
 }
Example #17
0
 public void LogCommandNumber(CommunicationCenter c, CommandCArgs e)
 {
     ChosenMove(this, e);
 }