java - Local search using the min-conflicts heuristic for solving a maze -


i have maze (represented in 2d matrix) below (5 x 5):

s 1 x 1 x 1 x 1 1 1 1 1 x 1 x x 1 g 1 x 1 1 1 1 1 

where s starting position, g goal position, , x obstacle.

how can apply local search using min conflict heuristics in maze.

what thinking using obstacles "conflicts" ,

1. start @ starting position, current = start; 2. find neighbor has least number of neighboring obstacles (conflicts),  3. update current neighbor state, , 4. repeat until goal found. 

for simplicity, can move left, right, or down ; no diagonal

am doing right? if here can point me right direction, great.

this valid algorithm solving maze. if told you had use min conflicts heuristic, think it's best approach, has nice properties of avoiding dead ends. however, i'm not sure particularly efficient. easy construct maze handle sub-optimally, instance:

s 1 1 1 1 x 1 x x x x 1 x g 1 x 1 x x 1 x 1 1 1 1 

at crux of it, min conflicts kind of strange heuristic use maze. designed used problems in whether or not answer solves problem determined whether or not conflicts rules (n-queens, instance). in these problems, reducing number of conflicts inherently means closer working solution. that's not case maze - thing determines whether or not have solution whether or not @ goal. might have go through tunnel of obstacles there. while technically correct, doesn't seem ideal approach.


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -