コード例 #1
0
        /// <summary>
        /// PP 盤上の駒
        /// </summary>
        /// <param name="fv"></param>
        /// <param name="fvDirectory"></param>
        public static void Write_PP_Banjo(IEngineConf engineConf, FeatureVector fv, string fvDirectory)
        {
            // P1が盤上の駒
            {
                PpItem_P1[] p1Items = new PpItem_P1[] {
                    new PpItem_P1(Path.Combine(fvDirectory, engineConf.GetResourceBasename("Fv04PP1pInFvDir")), "1P歩", FeatureVectorImpl.CHOSA_KOMOKU_1P + FeatureVectorImpl.CHOSA_KOMOKU_____FU_____),
                    new PpItem_P1(Path.Combine(fvDirectory, engineConf.GetResourceBasename("Fv05PP1pInFvDir")), "1P香", FeatureVectorImpl.CHOSA_KOMOKU_1P + FeatureVectorImpl.CHOSA_KOMOKU_____KYO____),
                    new PpItem_P1(Path.Combine(fvDirectory, engineConf.GetResourceBasename("Fv06pp1pInFvDir")), "1P桂", FeatureVectorImpl.CHOSA_KOMOKU_1P + FeatureVectorImpl.CHOSA_KOMOKU_____KEI____),
                    new PpItem_P1(Path.Combine(fvDirectory, engineConf.GetResourceBasename("Fv07pp1pInFvDir")), "1P銀", FeatureVectorImpl.CHOSA_KOMOKU_1P + FeatureVectorImpl.CHOSA_KOMOKU_____GIN____),
                    new PpItem_P1(Path.Combine(fvDirectory, engineConf.GetResourceBasename("Fv08pp1pInFvDir")), "1P金", FeatureVectorImpl.CHOSA_KOMOKU_1P + FeatureVectorImpl.CHOSA_KOMOKU_____KIN____),
                    new PpItem_P1(Path.Combine(fvDirectory, engineConf.GetResourceBasename("Fv09pp1pInFvDir")), "1P飛", FeatureVectorImpl.CHOSA_KOMOKU_1P + FeatureVectorImpl.CHOSA_KOMOKU_____HISYA__),
                    new PpItem_P1(Path.Combine(fvDirectory, engineConf.GetResourceBasename("Fv10pp1pInFvDir")), "1P角", FeatureVectorImpl.CHOSA_KOMOKU_1P + FeatureVectorImpl.CHOSA_KOMOKU_____KAKU___),

                    new PpItem_P1(Path.Combine(fvDirectory, engineConf.GetResourceBasename("Fv18pp2pInFvDir")), "2P歩", FeatureVectorImpl.CHOSA_KOMOKU_2P + FeatureVectorImpl.CHOSA_KOMOKU_____FU_____),
                    new PpItem_P1(Path.Combine(fvDirectory, engineConf.GetResourceBasename("Fv19pp2pInFvDir")), "2P香", FeatureVectorImpl.CHOSA_KOMOKU_2P + FeatureVectorImpl.CHOSA_KOMOKU_____KYO____),
                    new PpItem_P1(Path.Combine(fvDirectory, engineConf.GetResourceBasename("Fv20pp2pInFvDir")), "2P桂", FeatureVectorImpl.CHOSA_KOMOKU_2P + FeatureVectorImpl.CHOSA_KOMOKU_____KEI____),
                    new PpItem_P1(Path.Combine(fvDirectory, engineConf.GetResourceBasename("Fv21pp2pInFvDir")), "2P銀", FeatureVectorImpl.CHOSA_KOMOKU_2P + FeatureVectorImpl.CHOSA_KOMOKU_____GIN____),
                    new PpItem_P1(Path.Combine(fvDirectory, engineConf.GetResourceBasename("Fv22pp2pInFvDir")), "2P金", FeatureVectorImpl.CHOSA_KOMOKU_2P + FeatureVectorImpl.CHOSA_KOMOKU_____KIN____),
                    new PpItem_P1(Path.Combine(fvDirectory, engineConf.GetResourceBasename("Fv23pp2pInFvDir")), "2P飛", FeatureVectorImpl.CHOSA_KOMOKU_2P + FeatureVectorImpl.CHOSA_KOMOKU_____HISYA__),
                    new PpItem_P1(Path.Combine(fvDirectory, engineConf.GetResourceBasename("Fv24pp2pInFvDir")), "2P角", FeatureVectorImpl.CHOSA_KOMOKU_2P + FeatureVectorImpl.CHOSA_KOMOKU_____KAKU___),
                };
                foreach (PpItem_P1 item in p1Items)
                {
                    File.WriteAllText(item.Filepath, Format_FeatureVector_PP_P1Banjo.Format_PP_P1Banjo(fv, item.Title, item.P1_base));
                    //sb.AppendLine(item.Filepath);
                }
            }
        }
コード例 #2
0
        /// <summary>
        /// PP 5枚の持駒
        /// </summary>
        /// <param name="fv"></param>
        /// <param name="fvDirectory"></param>
        public static void Write_PP_5Mai(IEngineConf engineConf, FeatureVector fv, string fvDirectory)
        {
            var profilePath = System.Configuration.ConfigurationManager.AppSettings["Profile"];
            var toml        = Toml.ReadFile(Path.Combine(profilePath, "Engine.toml"));

            //StringBuilder sb = new StringBuilder();

            {
                PpItem_P1[] p1Items = new PpItem_P1[] {
                    new PpItem_P1(Path.Combine(fvDirectory, engineConf.GetResourceBasename("Fv12PP1pInFvDir")), "1P香", FeatureVectorImpl.CHOSA_KOMOKU_1P + FeatureVectorImpl.CHOSA_KOMOKU_MOTIKYO____),
                    new PpItem_P1(Path.Combine(fvDirectory, engineConf.GetResourceBasename("Fv13PP1pInFvDir")), "1P桂", FeatureVectorImpl.CHOSA_KOMOKU_1P + FeatureVectorImpl.CHOSA_KOMOKU_MOTIKEI____),
                    new PpItem_P1(Path.Combine(fvDirectory, engineConf.GetResourceBasename("Fv14PP1pInFvDir")), "1P銀", FeatureVectorImpl.CHOSA_KOMOKU_1P + FeatureVectorImpl.CHOSA_KOMOKU_MOTIGIN____),
                    new PpItem_P1(Path.Combine(fvDirectory, engineConf.GetResourceBasename("Fv15PP1pInFvDir")), "1P金", FeatureVectorImpl.CHOSA_KOMOKU_1P + FeatureVectorImpl.CHOSA_KOMOKU_MOTIKIN____),
                    new PpItem_P1(Path.Combine(fvDirectory, engineConf.GetResourceBasename("Fv26PP2pInFvDir")), "2P香", FeatureVectorImpl.CHOSA_KOMOKU_2P + FeatureVectorImpl.CHOSA_KOMOKU_MOTIKYO____),
                    new PpItem_P1(Path.Combine(fvDirectory, engineConf.GetResourceBasename("Fv27PP2pInFvDir")), "2P桂", FeatureVectorImpl.CHOSA_KOMOKU_2P + FeatureVectorImpl.CHOSA_KOMOKU_MOTIKEI____),
                    new PpItem_P1(Path.Combine(fvDirectory, engineConf.GetResourceBasename("Fv28PP2pInFvDir")), "2P銀", FeatureVectorImpl.CHOSA_KOMOKU_2P + FeatureVectorImpl.CHOSA_KOMOKU_MOTIGIN____),
                    new PpItem_P1(Path.Combine(fvDirectory, engineConf.GetResourceBasename("Fv29PP2pInFvDir")), "2P金", FeatureVectorImpl.CHOSA_KOMOKU_2P + FeatureVectorImpl.CHOSA_KOMOKU_MOTIKIN____),
                };
                foreach (PpItem_P1 item in p1Items)
                {
                    File.WriteAllText(item.Filepath, Format_FeatureVector_PP_P1Moti.Format_PP_P1Moti_5Mai(fv, item.Title, item.P1_base));
                    //sb.AppendLine(item.Filepath);
                }
            }
        }
コード例 #3
0
        /// <summary>
        /// PP 19枚の持駒
        /// </summary>
        /// <param name="fv"></param>
        /// <param name="fvDirectory"></param>
        public static void Write_PP_19Mai(IEngineConf engineConf, FeatureVector fv, string fvDirectory)
        {
            var profilePath = System.Configuration.ConfigurationManager.AppSettings["Profile"];
            var toml        = Toml.ReadFile(Path.Combine(profilePath, "Engine.toml"));

            //StringBuilder sb_result = new StringBuilder();

            {
                PpItem_P1[] p1Items = new PpItem_P1[] {
                    new PpItem_P1(Path.Combine(fvDirectory, engineConf.GetResourceBasename("Fv11PP1pInFvDir")), "1P歩", FeatureVectorImpl.CHOSA_KOMOKU_1P + FeatureVectorImpl.CHOSA_KOMOKU_MOTIFU_____),
                    new PpItem_P1(Path.Combine(fvDirectory, engineConf.GetResourceBasename("Fv25pp2pInFvDir")), "2P歩", FeatureVectorImpl.CHOSA_KOMOKU_2P + FeatureVectorImpl.CHOSA_KOMOKU_MOTIFU_____),
                };
                foreach (PpItem_P1 item in p1Items)
                {
                    File.WriteAllText(item.Filepath, Format_FeatureVector_PP_P1Moti.Format_PP_P1_Moti19Mai(fv, item.Title, item.P1_base));

                    //sb_result.AppendLine(item.Filepath);
                }
            }
        }