Thread: pathfinding and lists???

  1. #1
    Registered User I C everything's Avatar
    Join Date
    Apr 2019
    Posts
    101

    Question pathfinding and lists???

    Hi
    I am trying some pathfinding in 2d labyrinth,first improvised code and AI get stuck at one point in 2d Labyrinth
    so second attempt I have researched pathfinding and found some tutorial and its about openlist and closelist
    I thought I would start with simpler 4way solution first
    maybe some tip about exercise for list program first,to understand lists first,which is new to me
    or maybe tree's are better solutions?
    you tell me you can C,why dont you C your own bugs?

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Did you research the topic before you started coding?
    Maze solving algorithm - Wikipedia
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    May 2012
    Posts
    505
    Quote Originally Posted by I C everything View Post
    Hi
    I am trying some pathfinding in 2d labyrinth,first improvised code and AI get stuck at one point in 2d Labyrinth
    so second attempt I have researched pathfinding and found some tutorial and its about openlist and closelist
    I thought I would start with simpler 4way solution first
    maybe some tip about exercise for list program first,to understand lists first,which is new to me
    or maybe tree's are better solutions?
    There are several ways of doing pathfinding. Really you need to be familiar with basic structures like trees and lists before you develop your own algorithm. On the other hand, developing your own algorithm as a learning exercise might help you become familiar with these structures.

    Tbe "best" algorithm is a complex question, as there are several considerations - execution time, quality of path, memory usage, coding complexity, worst case time, average case time, whether it is easily extensible into arbitrary dimensions or non-flat spaces. There are lots of things you could potentialy consider.
    I'm the author of MiniBasic: How to write a script interpreter and Basic Algorithms
    Visit my website for lots of associated C programming resources.
    https://github.com/MalcolmMcLean


Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Pathfinding
    By nasser in forum C Programming
    Replies: 5
    Last Post: 05-20-2011, 12:13 AM
  2. fun with pathfinding
    By BobMcGee123 in forum Game Programming
    Replies: 11
    Last Post: 06-15-2006, 02:28 PM
  3. A* pathfinding: Has anyone here used it?
    By Stan100 in forum Game Programming
    Replies: 2
    Last Post: 10-11-2003, 01:46 PM
  4. AI (Pathfinding)
    By jdinger in forum Game Programming
    Replies: 7
    Last Post: 04-16-2003, 10:20 AM
  5. A* pathfinding
    By minesweeper in forum C++ Programming
    Replies: 3
    Last Post: 11-30-2002, 04:56 PM

Tags for this Thread