Beispiel #1
0
    public void RunIteration()
    {
        BlackboardExpert bestExpert    = null;
        float            maxInsistence = 0f;

        foreach (BlackboardExpert e in experts)
        {
            float insistence = e.GetInsistence(this);
            if (insistence > maxInsistence)
            {
                maxInsistence = insistence;
                bestExpert    = e;
            }
        }
        if (bestExpert != null)
        {
            bestExpert.Run(this);
        }
    }
Beispiel #2
0
    public void RunIteration()
    {
        BlackboardExpert bestExpert    = null;
        float            maxInsistence = 0f;

        //loop for deciding which expert will run next depending on the problem
        //that needs to be solved
        foreach (BlackboardExpert e in experts)
        {
            float insistence = e.GetInsistence(this);
            if (insistence > maxInsistence)
            {
                maxInsistence = insistence;
                bestExpert    = e;
            }
        }

        if (bestExpert != null)
        {
            bestExpert.Run(this);
        }
    }