public QLearningAnalysisExperiment(IObservableModel observableModel, IRandomNumberProvider randomNumberProvider, IDataRecorder dataRepository) { _observableModel = observableModel; _randomNumberProvider = randomNumberProvider; _dataRepository = dataRepository; }
public QLearningRewardAnalysis(IObservableModel observableModel, IRandomNumberProvider randomNumberProvider, ICumulativeEpochDataRecorder cumulativeTrialDataRecorderRepository) { _observableModel = observableModel; _randomNumberProvider = randomNumberProvider; _cumulativeTrialDataRepository = cumulativeTrialDataRecorderRepository; }
void OnRemoveInstance() { if (!Application.isPlaying) { return; } // unsubscribe if (BindableContext != null) { BindableContext.OnBindingUpdate -= RelayBindingUpdate; if (IsWrappedBinder) { ((ModelBinder)BindableContext).Dispose(); } } // remove type casts BindableContext = null; IsWrappedBinder = false; // set Binder DataInstance var array = Binders.ToArray(); for (int i = 0; i < array.Length; i++) { //was removed if (array[i].Context != this) { continue; } array[i].Model = null; } }
public QLearningTrialRunner(IObservableModel observableModel, IRandomNumberProvider randomNumberProvider, Func<int, IQLearningActor> actorProvider) { _observableModel = observableModel; _randomNumberProvider = randomNumberProvider; _actorProvider = actorProvider; }
public QLearningAnalysisTrialRunner(IObservableModel observableModel, IRandomNumberProvider randomNumberProvider, IDataRecorder recorder) { _observableModel = observableModel; _recorder = recorder; _randomNumberProvider = randomNumberProvider; }
public QLearningExperiment(IObservableModel observableModel, IRandomNumberProvider randomNumberProvider, ICumulativeDataRecorder cumulativeDataRepository) { _observableModel = observableModel; _randomNumberProvider = randomNumberProvider; _cumulativeDataRepository = cumulativeDataRepository; }
public QLearningTestActor(IQLearning qLearning, IObservableModel observableModel, int fixationLocation, ICumulativeDataRecorder dataRecorder) { _observableModel = observableModel; _fixationLocation = fixationLocation; _dataRecorder = dataRecorder; _qLearning = qLearning; }
private void WireUpModels(IObservableModel coreEventModel) { coreEventModel.Listen(om => _connectionInfo.ShowInfo(), om => CurrentController = _controllers.FirstOrDefault(typ => typ is LoginController), om => _printer.Print(), om => CurrentController = _previousController, om => CurrentController = _controllers.FirstOrDefault(typ => typ is MainMenuController)); }
public ModelBinder(object instance) { this._instance = instance; this._myType = this._instance.GetType(); this._insanceBehaviour = (instance as MonoBehaviour); this._bindableInstance = (instance as IObservableModel); if (this._bindableInstance != null) { this._bindableInstance.OnBindingUpdate += new Action <ObservableMessage>(this._bindableInstance_OnBindingUpdate); } }
protected virtual void OnDisable() { if (!Application.get_isPlaying()) { return; } if (this.IsApplicationQuit) { return; } this.Context = null; this.Model = null; }
public void Dispose() { this._bindingMessage.Dispose(); if (this._bindableInstance != null) { this._bindableInstance.OnBindingUpdate -= new Action <ObservableMessage>(this._bindableInstance_OnBindingUpdate); } this._myType = null; this._instance = null; this._insanceBehaviour = null; this._bindableInstance = null; this._bindingMessage = null; }
public ModelBinder(object instance) { _instance = instance; _myType = _instance.GetType(); _insanceBehaviour = instance as MonoBehaviour; _bindableInstance = instance as IObservableModel; if (_bindableInstance != null) { _bindableInstance.OnBindingUpdate += _bindableInstance_OnBindingUpdate; } }
public ModelBinder(object instance) { _instance = instance; _myType = _instance.GetType(); _insanceBehaviour = instance as MonoBehaviour; _bindableInstance = instance as IObservableModel; _notifyInstance = instance as INotifyPropertyChanged; if (_bindableInstance != null) _bindableInstance.OnBindingUpdate += _bindableInstance_OnBindingUpdate; else if (_notifyInstance != null) _notifyInstance.PropertyChanged += _notifyInstance_PropertyChanged; }
public void Dispose() { _bindingMessage.Dispose(); if (_bindableInstance != null) { _bindableInstance.OnBindingUpdate -= _bindableInstance_OnBindingUpdate; } _myType = null; _instance = null; _insanceBehaviour = null; _bindableInstance = null; _bindingMessage = null; }
public LuaModelBinder(object instance, LuaTable luaTable) { _luaTable = luaTable; _instance = instance; _insanceBehaviour = instance as MonoBehaviour; _bindableInstance = instance as IObservableModel; _notifyInstance = instance as INotifyPropertyChanged; if (_bindableInstance != null) { _bindableInstance.OnBindingUpdate += _bindableInstance_OnBindingUpdate; } else if (_notifyInstance != null) { _notifyInstance.PropertyChanged += _notifyInstance_PropertyChanged; } }
void OnAddInstance() { if (DebugMode) { Debug.Log(GetInstanceID() + ":" + name + ": " + " OnAddInstance"); } // set the data type if not null (Used By Editor Inspector). #if UNITY_WSA && !UNITY_EDITOR DataType = DataInstance.GetType().GetTypeInfo(); #else DataType = DataInstance.GetType(); #endif if (!Application.isPlaying) { return; } // set type casts BindableContext = DataInstance as IObservableModel; if (BindableContext == null) { BindableContext = new ModelBinder(DataInstance); IsWrappedBinder = true; } // subscribe to down messages BindableContext.OnBindingUpdate += RelayBindingUpdate; // Tell the binders of the new data instance var array = Binders.ToArray(); for (int i = 0; i < array.Length; i++) { //was removed if (array[i].Context != this) { continue; } array[i].Model = BindableContext; } }
public ModelBinder(object instance) { _instance = instance; _myType = _instance.GetType(); _insanceBehaviour = instance as MonoBehaviour; _bindableInstance = instance as IObservableModel; _notifyInstance = instance as INotifyPropertyChanged; if (_bindableInstance != null) { _bindableInstance.OnBindingUpdate += _bindableInstance_OnBindingUpdate; } else if (_notifyInstance != null) { _notifyInstance.PropertyChanged += _notifyInstance_PropertyChanged; } }
public void Dispose() { _bindingMessage.Dispose(); if (_bindableInstance != null) { _bindableInstance.OnBindingUpdate -= _bindableInstance_OnBindingUpdate; } if (_notifyInstance != null) { _notifyInstance.PropertyChanged -= _notifyInstance_PropertyChanged; } _myType = null; _instance = null; _insanceBehaviour = null; _bindableInstance = null; _bindingMessage = null; _notifyInstance = null; }
public void Initialize(IObservableModel model) { model.PrintScreenRequest = model.PrintScreenRequest ?? printScreenButton.GetClick().Select(_ => model); model.ExitRequest = model.ExitRequest ?? exitButton.GetClick().Select(_ => model); model.PreviousScreenRequest = prevScreen.GetClick().Select(_ => model); }
/// <summary> /// release from _root /// </summary> protected virtual void OnDisable() { // Dont reset in editor. if (!Application.isPlaying) return; if (IsApplicationQuit) return; if (DebugMode && Application.isPlaying) { Debug.Log(GetInstanceID() + ":" + name + ": " + "OnDisable"); } Context = null; Model = null; }
public QLearningBubbleAnalysisRunner(IObservableModel observableModel, IRandomNumberProvider randomNumberProvider) { _observableModel = observableModel; _randomNumberProvider = randomNumberProvider; }
public MapBubbleAnalysisRunner(IObservableModel observableModel, Func<IActor> actorProvider) { _observableModel = observableModel; _actorProvider = actorProvider; }
public BaseController(IObservableModel model, ISheet sheet) { _model = model; SheetRequester = new Subject<Sheets>(); _sheet = sheet; }
public MapTrialRunner(IObservableModel observableModel, Func<IActor> actorProvider, IDataRecorder recorder) { _observableModel = observableModel; _actorProvider = actorProvider; _recorder = recorder; }
public QLearningActor(IQLearning qLearning, IObservableModel observableModel, int fixationLocation) { _observableModel = observableModel; _fixationLocation = fixationLocation; _qLearning = qLearning; }
public ViewModelImpl() { Model = new ObservableModelImpl <T>(); }
public ViewModelImpl(IObservableModel <T> Model) { this.Model = Model; }
public void Initialize(IObservableModel model) { model.ConnectionInfoRequest = ConnectionInformation.GetClick().Select(ev => model); }