Exemple #1
0
        public void GetPossibilities(List <PossibilityResult> outlist)
        {
            foreach (var real in realizations)
            {
                if (real.Real(out var job, out var uncertain))
                {
                    var stream = new U.DoubleStream(U.InputSize);

                    job();

                    Parent.Introspect(stream);
                    Parent.SerializeSurrounding(stream);

                    Undo();

                    Action unc_real;
                    if (uncertain != null)
                    {
                        unc_real = uncertain.Realization;
                        stream.WriteOneHot(UncertainEvent.IDSpaceLenght, uncertain.GetID);
                    }
                    else
                    {
                        unc_real = PossibilityResult.Empty;
                        stream.WriteEmpty(UncertainEvent.IDSpaceLenght);
                    }

                    outlist.Add(new PossibilityResult(job, unc_real, stream.ToArray()));
                }
            }
        }
Exemple #2
0
            //public static PossibilityResult Default(AgentBase a) => HoldPossibility(a);
            public static PossibilityResult HoldPossibility(Agent a)
            {
                var stream = new U.DoubleStream(U.InputSize);

                a.Introspect(stream);
                a.SerializeSurrounding(stream);
                stream.WriteEmpty(UncertainEvent.IDSpaceLenght);

                return(new PossibilityResult(() => { }, () => { }, stream.ToArray(), 0.5));
            }
Exemple #3
0
 public abstract void SerializeSurrounding(U.DoubleStream stream);
Exemple #4
0
 public abstract void Introspect(U.DoubleStream stream);
Exemple #5
0
 public abstract void SerializeSurrounding(Agent a, int rad, U.DoubleStream stream);
Exemple #6
0
 public override void Serialize(U.DoubleStream stream) => stream.WriteEmpty(IDSpaceCount);
Exemple #7
0
 public virtual void Serialize(U.DoubleStream stream) => stream.WriteOneHot(IDSpaceCount, GetID);