Exemplo n.º 1
0
        public void Think(Domain <AIContext> domain)
        {
            var startGoal = _context.GetGoal();

            while (_context.GetGoal() == startGoal)
            {
                _planner.Tick(domain, _context);
            }
        }
Exemplo n.º 2
0
        public void Think(Domain <AIContext> domain)
        {
            var startGoal = _context.GetGoal();

            while (_context.GetGoal() == startGoal)
            {
                _planner.Tick(domain, _context);

                if (_context.LogDecomposition)
                {
                    Console.WriteLine("---------------------- DECOMP LOG --------------------------");
                    while (_context.DecompositionLog?.Count > 0)
                    {
                        var entry = _context.DecompositionLog.Dequeue();
                        var depth = FluidHTN.Debug.Debug.DepthToString(entry.Depth);
                        Console.ForegroundColor = entry.Color;
                        Console.WriteLine($"{depth}{entry.Name}: {entry.Description}");
                    }
                    Console.ResetColor();
                    Console.WriteLine("-------------------------------------------------------------");
                }
            }
        }