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); } }
private void LogCommand(CommandCenter c, CommandCArgs e) { if (Enabled) { } if (Started) { } }
private void LogNodeDecision(CommandCenter c, CommandCArgs e) { if (Enabled) { } if (Started) { } }
private void LogStart(CommandCenter c, CommandCArgs e) { if (Enabled) { RoundMoves = ""; Started = true; StrW = new StreamWriter(path, true); StrW.WriteLine(Environment.NewLine + "Game Start"); } }
private void LogPlayer(CommandCenter c, CommandCArgs e) { if (Enabled) { if (Started) { StrW.WriteLine("Player: " + e.GetIntArrayData()[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(); } }
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 { } } }
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(); } } }
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(); } }
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"); } } } }
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); } } }
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); } } } }
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"); } } } }
private void LogOperators(CommandCenter c, CommandCArgs e) { if (Enabled) { } }
private void LogDataSources(CommandCenter c, CommandCArgs e) { if (Enabled) { } }
public void LogCommandNumber(CommunicationCenter c, CommandCArgs e) { ChosenMove(this, e); }