コード例 #1
0
ファイル: Test.cs プロジェクト: tansey/holdem_features
        public void UtgAction()
        {
            LimitFeatureGenerator _featureGen = new LimitFeatureGenerator() { SkipMissingFeatures = true };

            var hand = buildHand(utg);

            var data = _featureGen.GenerateClassifierInstances(0);

            _featureGen.GenerateFeatures(hand, 0, 0, data, false);
        }
コード例 #2
0
ファイル: WekaPlayer.cs プロジェクト: tansey/console_holdem
        public WekaPlayer(string preflopModelFile, string flopModelFile, 
		                   string turnModelFile, string riverModelFile)
        {
            if(_featureGen == null)
                _featureGen = new LimitFeatureGenerator() { SkipMissingFeatures = true };

            if(_models == null)
            {
                _models = new Classifier[4];
                _models[0] = (Classifier)weka.core.SerializationHelper.read(preflopModelFile);
                _models[1] = (Classifier)weka.core.SerializationHelper.read(flopModelFile);
                _models[2] = (Classifier)weka.core.SerializationHelper.read(turnModelFile);
                _models[3] = (Classifier)weka.core.SerializationHelper.read(riverModelFile);
            }

            if(_instances == null)
            {
                _instances = new Instances[4];
                for(int i = 0; i < 4; i++)
                    _instances[i] = _featureGen.GenerateInstances(i);
            }
        }
コード例 #3
0
 public NeuralNetworkPlayer(FeedForwardNeuralNetwork network)
 {
     _network = network;
     _featureGen = new LimitFeatureGenerator();
 }