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())); } } }
//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)); }
public abstract void SerializeSurrounding(U.DoubleStream stream);
public abstract void Introspect(U.DoubleStream stream);
public abstract void SerializeSurrounding(Agent a, int rad, U.DoubleStream stream);
public override void Serialize(U.DoubleStream stream) => stream.WriteEmpty(IDSpaceCount);
public virtual void Serialize(U.DoubleStream stream) => stream.WriteOneHot(IDSpaceCount, GetID);