Esempio n. 1
0
        public void Update(GuessStrategyArgs args)
        {
            // 実行結果のクリア
            isSuccess = false;
            guessList.Clear();

            // 初日は実行失敗
            if (args.Agi.Day <= 1)
            {
                return;
            }

            DayInfo dayInfo = args.Agi.DayInfo[1];

            foreach (ExtTalk talk in dayInfo.TalkList)
            {
                if (talk.Content.Operator == Operator.NOP && talk.Content.Topic == Topic.ESTIMATE && talk.Content.Role == Role.WEREWOLF)
                {
                    BitCondition con = new BitCondition();
                    con.AddWerewolf(talk.Agent);
                    con.AddWerewolf(talk.Content.Target);

                    guessList.Add(new PartGuess()
                    {
                        Condition   = con,
                        Correlation = 0.95,
                    });
                }
            }

            // 実行成功にする
            isSuccess = true;
        }
Esempio n. 2
0
        public void Update(GuessStrategyArgs args)
        {
            // 実行結果のクリア
            guessList.Clear();

            // 役職CO者を取得
            List <Agent> seerList      = args.Agi.GetComingOutAgent(Role.SEER);
            List <Agent> mediumList    = args.Agi.GetComingOutAgent(Role.MEDIUM);
            List <Agent> bodyguardList = args.Agi.GetComingOutAgent(Role.BODYGUARD);

            // 占い師が全偽のパターン
            if (seerList.Count > 0)
            {
                BitCondition con = new BitCondition();
                foreach (Agent agent in seerList)
                {
                    con.AddWerewolfTeam(agent);
                }
                guessList.Add(new PartGuess()
                {
                    Condition   = con,
                    Correlation = 0.2,
                });
            }

            // 5人村-狂人が騙っていないパターン
            if (args.Agi.AgentList.Count == 5 && seerList.Count > 0)
            {
                BitCondition con = new BitCondition();
                foreach (Agent agent in seerList)
                {
                    con.AddNotPossessed(agent);
                }
                guessList.Add(new PartGuess()
                {
                    Condition   = con,
                    Correlation = 0.3,
                });
            }

            // 15人村-狂人が騙っていないパターン
            if (args.Agi.AgentList.Count == 15 && seerList.Count + mediumList.Count >= 4)
            {
                BitCondition con = new BitCondition();
                foreach (Agent agent in seerList)
                {
                    con.AddNotPossessed(agent);
                }
                foreach (Agent agent in mediumList)
                {
                    con.AddNotPossessed(agent);
                }
                guessList.Add(new PartGuess()
                {
                    Condition   = con,
                    Correlation = 0.3,
                });
            }

            // 霊媒師が全偽のパターン
            if (mediumList.Count > 0)
            {
                BitCondition con = new BitCondition();
                foreach (Agent agent in mediumList)
                {
                    con.AddWerewolfTeam(agent);
                }
                guessList.Add(new PartGuess()
                {
                    Condition   = con,
                    Correlation = 0.1,
                });
            }

            // 実行成功にする
            isSuccess = true;
        }
Esempio n. 3
0
        public void Update(GuessStrategyArgs args)
        {
            // 実行結果のクリア
            guessList.Clear();

            // 自分の判定は100%信じる
            foreach (AIWolf.Lib.Judge judge in args.Agi.MySeerJudge)
            {
                guessList.Add(new PartGuess()
                {
                    Condition   = RoleCondition.GetCondition(judge.Target, Role.WEREWOLF),
                    Correlation = (judge.Result == Species.WEREWOLF) ? 10.0 : 0.0,
                });
            }

            // 役職CO者を取得
            List <Agent> seerList = args.Agi.GetComingOutAgent(Role.SEER);

            // 判定騙りをするエージェントを取得(推測)
            AgentStatistics statistics   = (AgentStatistics)args.Items["AgentStatistics"];
            List <Agent>    liarSeerList = new List <Agent>();

            foreach (Agent agent in seerList)
            {
                int roleEveCnt  = statistics.statistics[agent].eventCount[Role.SEER].GetOrDefault("1d_DevineWhite", 0);
                int roleEveCnt2 = statistics.statistics[agent].eventCount[Role.SEER].GetOrDefault("1d_DevineBlack", 0);

                if (roleEveCnt + roleEveCnt2 >= 5 && roleEveCnt2 > roleEveCnt)
                {
                    liarSeerList.Add(agent);
                }
            }

            foreach (Wepwawet.Lib.Judge judge in args.Agi.SeerJudge)
            {
                double fakeBlaskJudgeRate = 0.1;
                if (liarSeerList.Contains(judge.Agent))
                {
                    fakeBlaskJudgeRate = 3.0 / 4.0 * 2.0 / 3.0;
                }

                // 村陣営が人間に人狼判定
                if (judge.Result == Species.WEREWOLF)
                {
                    BitCondition con = new BitCondition();
                    con.AddNotWerewolfTeam(judge.Agent);
                    con.AddNotWerewolf(judge.Target);
                    guessList.Add(new PartGuess()
                    {
                        Condition   = con,
                        Correlation = fakeBlaskJudgeRate,
                    });
                }

                // 村陣営が人狼に人間判定
                if (judge.Result == Species.HUMAN)
                {
                    BitCondition con = new BitCondition();
                    con.AddNotWerewolfTeam(judge.Agent);
                    con.AddWerewolf(judge.Target);
                    guessList.Add(new PartGuess()
                    {
                        Condition   = con,
                        Correlation = 0.1,
                    });
                }
            }

            // COから村騙りが無い場合の内訳を絞り込む
            List <Agent> coAgent = args.Agi.GetComingOutAgent(Role.SEER);

            if (coAgent.Count >= 2)
            {
                BitMatchNumCondition con = new BitMatchNumCondition()
                {
                    MinNum = 0,
                    MaxNum = coAgent.Count - 2
                };
                foreach (Agent agent in coAgent)
                {
                    con.AddWerewolfTeam(agent);
                }
                guessList.Add(new PartGuess()
                {
                    Condition   = con,
                    Correlation = 0.1,
                });
            }

            // 実行成功にする
            isSuccess = true;
        }