title: AIMLBot C# save brain
body: <p>I am working with AIMLbot.dll in c#. I saw two functions <code>saveToBinaryFile</code> and <code>loadFromBinaryFile</code>. I think these functions are to store current contents in bot's brain to a file. But it doesn't seems to be working! Means, If I say to remember my name and save the content to GraphMaster.dat file. Next time I load the content of the same file and when I ask my name its giving the wrong answer. My class is as follows.</p>
  
  <pre><code>class AIBot
      {
          private Bot myBot;
          private User myUser;
  
          public AIBot()
          {
              myBot = new Bot();
              myUser = new User("UnknownUser", myBot);
          }
  
          public void Initialize()
          {
              myBot.loadSettings();
              myBot.isAcceptingUserInput = false;
              myBot.loadAIMLFromFiles();
              myBot.isAcceptingUserInput = true;
          }
  
          public void Load()
          {
              if (File.Exists(AppDomain.CurrentDomain.BaseDirectory + @"\Graphmaster.dat"))
                  myBot.loadFromBinaryFile(AppDomain.CurrentDomain.BaseDirectory + @"\Graphmaster.dat");
          }
  
          public string GetResponse(string input)
          {
              Request r = new Request(input, myUser, myBot);
              Result res = myBot.Chat(r);
              return (res.Output);
          }
  
          public void Save()
          {
              myBot.saveToBinaryFile(AppDomain.CurrentDomain.BaseDirectory + @"\Graphmaster.dat");
          }
      }
  </code></pre>
  
  <p>Can anybody help to point out the problem? </p>