public RandomBasicTrialRunner(IVisualArrayGenerator visualArrayGenerator, Func<IActor> actorProvider,
     IDataRecorder recorder)
 {
     _visualArrayGenerator = visualArrayGenerator;
     _actorProvider = actorProvider;
     _recorder = recorder;
 }
Exemplo n.º 2
0
        public void Load(string db_name, IDataRecorder recorder, ICalamFilter filter = null)
        {
            var bin_path = AppDomain.CurrentDomain.BaseDirectory.TrimEnd('\\');

            try{
                using (var con = new SQLiteConnection("Data Source=" + bin_path + "\\db.sqlite3")){
                    con.Open();
                    var sql = "select * from " + db_name;
                    var com = new SQLiteCommand(sql, con);
                    var sdr = com.ExecuteReader();
                    while (sdr.Read() == true)
                    {
                        if (filter != null && !filter.Filter(sdr))
                        {
                            continue;
                        }
                        recorder.AddMember(sdr);
                    }
                    sdr.Close();
                    con.Close();
                }
            }catch (Exception e) {
                Console.WriteLine("Database not found");
            }
        }
 public QLearningAnalysisExperiment(IObservableModel observableModel, IRandomNumberProvider randomNumberProvider,
     IDataRecorder dataRepository)
 {
     _observableModel = observableModel;
     _randomNumberProvider = randomNumberProvider;
     _dataRepository = dataRepository;
 }
 public QLearningAnalysisTrialRunner(IObservableModel observableModel, IRandomNumberProvider randomNumberProvider,
     IDataRecorder recorder)
 {
     _observableModel = observableModel;
     _recorder = recorder;
     _randomNumberProvider = randomNumberProvider;
 }
 public QLearningRecordingTrialRunner(IObservableModel observableModel, IRandomNumberProvider randomNumberProvider,
     Func<int, IQLearningActor> actorProvider, IDataRecorder dataRecorder)
 {
     _observableModel = observableModel;
     _randomNumberProvider = randomNumberProvider;
     _actorProvider = actorProvider;
     _dataRecorder = dataRecorder;
 }
 public RandomBeliefTrialRunnerWithExclusion(IObservableModelForControls observableModel,
     Func<IActor> actorProvider,
     IDataRecorder recorder)
 {
     _observableModel = observableModel;
     _actorProvider = actorProvider;
     _recorder = recorder;
 }
 public RandomBeliefTrialRunner(IObservableModelForControls observableModelForControls,
     Func<IActor> actorProvider,
     IDataRecorder recorder)
 {
     _observableModelForControls = observableModelForControls;
     _actorProvider = actorProvider;
     _recorder = recorder;
 }
Exemplo n.º 8
0
 public KnBSimulator(
     IPlayManager playManager,
     ICardPackFactory cardPackFactory,
     IDataRecorder dataRecorder)
 {
     PlayManager     = playManager ?? throw new ArgumentNullException();
     CardPackFactory = cardPackFactory ?? throw new ArgumentNullException();
     DataRecorder    = dataRecorder ?? throw new ArgumentNullException();
 }
Exemplo n.º 9
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="dataRecorder"></param>
        /// <param name="dateTimeExtracter"></param>
        /// <param name="maxEntries"> The maximum data entries to collect </param>
        public SeeTicketsCrawler(IDataRecorder dataRecorder, IDateTimeExtracter dateTimeExtracter,
                                 char[] pagesToVisit, int maxEntries)
        {
            this.dataRecorder      = dataRecorder;
            this.dateTimeExtracter = dateTimeExtracter;
            this.pagesToVisit      = pagesToVisit;
            this.maxEntries        = maxEntries;

            this.data = new List <CrawledInfo>();
        }
Exemplo n.º 10
0
 public CDataRecorderProxy(String source = "DAL")
 {
     if (source.Equals("DAL"))
     {
         _recorder = new CDataRecorderDB();
     }
     else
     {
         log.Fatal("Data supplier are not defined");
         throw new ArgumentException();
     }
 }
 public MapTrialRunner(IObservableModel observableModel, Func<IActor> actorProvider, IDataRecorder recorder)
 {
     _observableModel = observableModel;
     _actorProvider = actorProvider;
     _recorder = recorder;
 }