/// <summary> /// 局面に、評価値を付けます。 /// </summary> public static void DoScoreing_Kyokumen( KifuNode node_yomi_mutable, EvaluationArgs args ) { //---------------------------------------- // 千日手判定 //---------------------------------------- bool isSennitite; { ulong hash = Conv_Sky.ToKyokumenHash(node_yomi_mutable.Value.KyokumenConst); if (args.SennititeConfirmer.IsNextSennitite(hash)) { // 千日手になる場合。 isSennitite = true; } else { isSennitite = false; } } // 局面スコア node_yomi_mutable.KyHyokaSheet_Mutable.Clear(); if (isSennitite) { // 千日手用の評価をします。 Hyokakansu hyokakansu = Util_HyokakansuCollection.Hyokakansu_Sennichite; float score; #if DEBUG || LEARN KyHyokaMeisai_Koumoku meisai; #endif hyokakansu.Evaluate( out score, #if DEBUG || LEARN out meisai, #endif node_yomi_mutable.Value.KyokumenConst, args.FeatureVector ); node_yomi_mutable.AddScore(score); #if DEBUG || LEARN node_yomi_mutable.KyHyokaSheet_Mutable.Add( hyokakansu.Name.ToString(), meisai ); #endif } else { Util_HyokakansuCollection.EvaluateAll_Normal( node_yomi_mutable, args.FeatureVector ); } }
private KeisokuResult Keisoku(Hyokakansu handan1) { Stopwatch watch = new Stopwatch(); watch.Start(); float score; #if DEBUG || LEARN KyHyokaMeisai_Koumoku meisai; #endif handan1.Evaluate( out score, #if DEBUG || LEARN out meisai, #endif this.Src_Sky, this.FeatureVector ); watch.Stop(); KeisokuResult result = new KeisokuResult( handan1.Name.ToString(), #if DEBUG || LEARN meisai.Utiwake, #endif watch.Elapsed); return(result); }