Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Algorithms
  4. Goal finding: I just need the name of an algorithm

Goal finding: I just need the name of an algorithm

Scheduled Pinned Locked Moved Algorithms
algorithmshelpquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    Q Offline
    Quake2Player
    wrote on last edited by
    #1

    Hi, I need to find a goal given the following conditions -I only know my 4 surroundings (N,W,S,E): they can be empty or an obstacle -I know the goal coordinates (x,y) -I know my coordinates I know bug-2 (and bug-1) are complete algorithms (they always find the goal). But it is really bad in some maps with large obstacles. My questions are two. 1. How come there arent quick and well-known solutions to this? Ive been googling for ages and I just find theoretical papers, full of blabla and no pseudocode. 2. A* wouldnt work for this because of my first restriction, right? Thanks

    N R 2 Replies Last reply
    0
    • Q Quake2Player

      Hi, I need to find a goal given the following conditions -I only know my 4 surroundings (N,W,S,E): they can be empty or an obstacle -I know the goal coordinates (x,y) -I know my coordinates I know bug-2 (and bug-1) are complete algorithms (they always find the goal). But it is really bad in some maps with large obstacles. My questions are two. 1. How come there arent quick and well-known solutions to this? Ive been googling for ages and I just find theoretical papers, full of blabla and no pseudocode. 2. A* wouldnt work for this because of my first restriction, right? Thanks

      N Offline
      N Offline
      NickHighIQ
      wrote on last edited by
      #2

      I'm sure A* would work - all it requires is to know if a neighbouring tile is walkable or not, and then a cost for moving there. (Sidenote: you could substitute this for simply assigning a cost to moving across each tile and make impassable obstacles have infinite cost?) Anyway, here's a good A* link: http://www.policyalmanac.org/games/aStarTutorial.htm This is 8-directional, but it will work exactly the same in 4-directional.

      1 Reply Last reply
      0
      • Q Quake2Player

        Hi, I need to find a goal given the following conditions -I only know my 4 surroundings (N,W,S,E): they can be empty or an obstacle -I know the goal coordinates (x,y) -I know my coordinates I know bug-2 (and bug-1) are complete algorithms (they always find the goal). But it is really bad in some maps with large obstacles. My questions are two. 1. How come there arent quick and well-known solutions to this? Ive been googling for ages and I just find theoretical papers, full of blabla and no pseudocode. 2. A* wouldnt work for this because of my first restriction, right? Thanks

        R Offline
        R Offline
        Radhakrishnan G
        wrote on last edited by
        #3

        Hi You can represent this as a Graph-problem(some kind of shortest path algorithm) You can apply these restrictions while moving 1 . Trace your current path, if the new slot is in the current path ignore that to avoid a loop 2 . Mark the positions in which no further movements are possible so that we can ignore that. 3 . If we have no further move retract your move using a stack Back-tracking may not be an optimal solution, but you can apply some restrictions to improve it Thanks

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups