Example #1
0
 private static void AddDefaultSerializers()
 {
     AddDeserializer <EvolutionarySequenceMaker>(baseData =>
     {
         var saveData = MotionGeneratorSerialization.Deserialize <EvolutionarySequenceMakerSaveData>(baseData);
         return(new EvolutionarySequenceMaker(saveData));
     });
     AddDeserializer <FixedSequenceMaker>(baseData =>
     {
         var saveData = MotionGeneratorSerialization.Deserialize <FixedSequenceMakerSaveData>(baseData);
         return(new FixedSequenceMaker(saveData));
     });
     AddDeserializer <RandomSequenceMaker>(baseData =>
     {
         var saveData = MotionGeneratorSerialization.Deserialize <RandomSequenceMakerSaveData>(baseData);
         return(new RandomSequenceMaker(saveData));
     });
     AddDeserializer <SimpleBanditSequenceMaker>(baseData =>
     {
         var saveData = MotionGeneratorSerialization.Deserialize <SimpleBanditSequenceMakerSaveData>(baseData);
         return(new SimpleBanditSequenceMaker(saveData));
     });
     AddDeserializer <SimpleBanditSequenceMakerRandom>(baseData =>
     {
         var saveData = MotionGeneratorSerialization.Deserialize <SimpleBanditSequenceMakerRandomSaveData>(baseData);
         return(new SimpleBanditSequenceMakerRandom(saveData));
     });
 }
Example #2
0
 private static void AddDefaultSerializers()
 {
     AddDeserializer <GluttonySoul>();
     AddDeserializer <SnufflingSoul>();
     AddDeserializer <SnufflingDifferencialSoul>();
     AddDeserializer <SnufflingFleshSoul>();
     AddDeserializer <SnufflingFleshDifferencialSoul>();
     AddDeserializer <ShoutingLoveSoul>();
     AddDeserializer <ShoutingLoveDifferencialSoul>();
     AddDeserializer <NostalgiaSoul>();
     AddDeserializer <CrowdDifferencialSoul>();
     AddDeserializer <CowardSoul>();
     AddDeserializer <CowardDiffrencialSoul>();
     AddDeserializer <BumpingDifferencialSoul>();
     AddDeserializer <LazySoul>();
     AddDeserializer <FamiliarDiffrencialSoul>();
     AddDeserializer <ModerateSnufflingDifferencialSoul>();
     AddDeserializer <ModerateSnufflingFleshDifferencialSoul>();
     AddDeserializer <ModerateFamiliarDiffrencialSoul>();
     AddDeserializer <ModerateBumpingDifferencialSoul>();
     AddDeserializer <AvoidObjectSoul>();
     AddDeserializer <EnergizeSoul>();
     AddDeserializer <TerritorySoul>(baseData =>
     {
         var saveData = MotionGeneratorSerialization.Deserialize <TerritorySoulSaveData>(baseData);
         return(new TerritorySoul(saveData));
     });
 }
Example #3
0
 private static void AddDefaultSerializers()
 {
     AddDeserializer <TurnRightAction>(baseData =>
     {
         var saveData = MotionGeneratorSerialization.Deserialize <TurnRightActionSaveData>(baseData);
         return(new TurnRightAction(saveData));
     });
     AddDeserializer <TurnLeftAction>(baseData =>
     {
         var saveData = MotionGeneratorSerialization.Deserialize <TurnLeftActionSaveData>(baseData);
         return(new TurnLeftAction(saveData));
     });
     AddDeserializer <GoForwardCoordinateAction>(baseData =>
     {
         var saveData = MotionGeneratorSerialization.Deserialize <GoForwardCoordinateActionSaveData>(baseData);
         return(new GoForwardCoordinateAction(saveData));
     });
     AddDeserializer <ShootUpwardAction>(baseData =>
     {
         var saveData = MotionGeneratorSerialization.Deserialize <ShootUpwardActionSaveData>(baseData);
         return(new ShootUpwardAction(saveData));
     });
     AddDeserializer <SubDecisionMakerAction>(baseData =>
     {
         var saveData = MotionGeneratorSerialization.Deserialize <SubDecisionMakerActionSaveData>(baseData);
         return(new SubDecisionMakerAction(saveData));
     });
     AddDeserializer <StayAction>(baseData =>
     {
         var saveData = MotionGeneratorSerialization.Deserialize <StayActionSaveData>(baseData);
         return(new StayAction(saveData));
     });
     AddDeserializer <SpinTurnAction>(baseData =>
     {
         var saveData = MotionGeneratorSerialization.Deserialize <SpinTurnActionSaveData>(baseData);
         return(new SpinTurnAction(saveData));
     });
     AddDeserializer <RestAction>(baseData =>
     {
         var saveData = MotionGeneratorSerialization.Deserialize <RestActionSaveData>(baseData);
         return(new RestAction(saveData));
     });
     AddDeserializer <HopAction>(baseData =>
     {
         var saveData = MotionGeneratorSerialization.Deserialize <HopActionSaveData>(baseData);
         return(new HopAction(saveData));
     });
     AddDeserializer <LocomotionAction>(baseData =>
     {
         var saveData = MotionGeneratorSerialization.Deserialize <LocomotionActionSaveData>(baseData);
         return(new LocomotionAction(saveData));
     });
     AddDeserializer <WalkingLocomotionAction>(baseData =>
     {
         var saveData = MotionGeneratorSerialization.Deserialize <LocomotionActionSaveData>(baseData);
         return(new WalkingLocomotionAction(new LocomotionAction(saveData)));
     });
 }
Example #4
0
 private static void AddDefaultSerializers()
 {
     AddDeserializer <NoDecisionMaker>(baseData =>
     {
         var saveData = MotionGeneratorSerialization.Deserialize <NoDecisionMakerSaveData>(baseData);
         return(new NoDecisionMaker(saveData));
     });
     AddDeserializer <RemoteDecisionMaker>(baseData =>
     {
         var saveData = MotionGeneratorSerialization.Deserialize <RemoteDecisionMakerSaveData>(baseData);
         return(new RemoteDecisionMaker(saveData));
     });
     AddDeserializer <FollowPointDecisionMaker>(baseData =>
     {
         var saveData = MotionGeneratorSerialization.Deserialize <FollowPointDecisionMakerSaveData>(baseData);
         return(new FollowPointDecisionMaker(saveData));
     });
     AddDeserializer <ReinforcementDecisionMaker>(baseData =>
     {
         var saveData = MotionGeneratorSerialization.Deserialize <ReinforcementDecisionMakerSaveData>(baseData);
         return(new ReinforcementDecisionMaker(saveData));
     });
     AddDeserializer <FollowHighestDensityDecisionMaker>(baseData =>
     {
         var saveData = MotionGeneratorSerialization.Deserialize <FollowHighestDensityDecisionMakerSaveData>(baseData);
         return(new FollowHighestDensityDecisionMaker(saveData));
     });
     AddDeserializer <HeuristicReinforcementDecisionMaker>(baseData =>
     {
         var saveData = MotionGeneratorSerialization.Deserialize <HeuristicReinforcementDecisionMakerSaveData>(baseData);
         return(new HeuristicReinforcementDecisionMaker(saveData));
     });
     AddDeserializer <FollowPointOrIdleDecisionMaker>(baseData =>
     {
         var saveData = MotionGeneratorSerialization.Deserialize <FollowPointOrIdleDecisionMakerSaveData>(baseData);
         return(new FollowPointOrIdleDecisionMaker(saveData));
     });
 }
Example #5
0
 public static byte[] SerializeByMsgPack <T>(T src)
 {
     return(MotionGeneratorSerialization.Serialize(src));
 }
Example #6
0
 public static T DeepCloneByMsgPack <T>(T src)
 {
     return(MotionGeneratorSerialization.DeepClone(src));
 }