Пример #1
0
        //Print the Social Knowledgebase
        private static void printSKB()
        {
            KB_S SKB = new KB_S();

            SocialGame girlGame = new SocialGame(new Subject(SubjectType.Girl));
            SocialGame playerGame = new SocialGame(new Subject(SubjectType.Player));

            Agent agent1 = new Agent("agent1");
            Agent agent2 = new Agent("agent2");
            Agent agent3 = new Agent("agent3");
            Agent agent4 = new Agent("agent4");

            SocialFact sf1 = new SocialFact(girlGame, agent1, agent2);
            SocialFact sf2 = new SocialFact(playerGame, agent1, agent2);
            SocialFact sf3 = new SocialFact(girlGame, agent3, agent1);

            SKB.addNewFact(sf1);
            SKB.addNewFact(sf2);
            SKB.addNewFact(sf3);

            List<SocialFact> factsByAgent = SKB.getSocialFactsByAgent(agent2);
            Console.WriteLine("FOUND: " + factsByAgent.Count + " FACTS.");

            List<SocialFact> factsByGame = SKB.getSocialFactsBySubject(new Subject(SubjectType.Girl));
            Console.WriteLine("FOUND: " + factsByGame.Count + " FACTS.");

            //SocialFact sf1 = new SocialFact()
        }
Пример #2
0
 public void addNewFact(SocialFact latestEvent)
 {
     events.Add(latestEvent);
 }