Ejemplo n.º 1
0
        public NPuzzleForm()
        {
            InitializeComponent();
            InitState();

            N = 4;


            hcal      = new NPuzzleManDistCal(N);
            sucgen    = new ANodeSucGen(new Solvers.NPuzzleBench.NPuzzle(N));
            uctSucGen = new UCTNodeSucGen(new Solvers.NPuzzleBench.NPuzzle(N));

            ConfigureDGV(N);
            FillDGV(startTiles, N);
            chart = new Chart();
            radioButton1.Checked = true;
            listOfForms          = new List <Form>();
        }
Ejemplo n.º 2
0
        public GridWorldForm()
        {
            InitializeComponent();
            Dock = DockStyle.Fill;
            ReadyState();
            blockSizeList.SelectedItem = "Size 1";
            Bitmap bitmap = new Bitmap(400, 400);

            for (int i = 0; i < bitmap.Height; i++)
            {
                for (int j = 0; j < bitmap.Width; j++)
                {
                    bitmap.SetPixel(j, i, Color.White);
                }
            }
            gwMap              = new GridWorldMap(bitmap);
            pictureBox1.Width  = bitmap.Width;
            pictureBox1.Height = bitmap.Height;
            pictureBox1.Image  = bitmap;
            pictureBox1.Update();
            blockSize   = 1;
            listOfForms = new List <Form>();



            StartX = 0;
            StartY = 0;
            GoalX  = (gwMap.BitMap.Height / blockSize) * blockSize - blockSize;
            GoalY  = (gwMap.BitMap.Height / blockSize) * blockSize - blockSize;


            hcal      = new GWHCal(blockSize);
            sucgen    = new ANodeSucGen(new GridWorld(gwMap, blockSize));
            uctSucGen = new UCTNodeSucGen(new GridWorld(gwMap, blockSize));


            radioButton1.Checked = true;
            blockSizeList.Text   = blockSizeList.Items[0].ToString();


            InitialState();
        }