CodeGuru Forums -
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic Newsletters VB Forums Developer.com


Newest CodeGuru.com Articles:

  • Faltering Windows support
  • Internet Explorer 8 Click Clever Click Safe
  • Release Candidate 2 for ASP.NET MVC 2
  • Learn How to Create Dual Mode Windows Services

  • Search CodeGuru:
     



    Go Back   CodeGuru Forums > General Discussion > Algorithms & Data Structures
    FAQ Members List Calendar Search Today's Posts Mark Forums Read

    Algorithms & Data Structures Discuss algorithms & data structures. Topics are not specific to any programming language.

    Reply
     
    Thread Tools Search this Thread Rate Thread Display Modes
      #1    
    Old November 20th, 2009, 03:32 AM
    powerbuddy powerbuddy is offline
    Junior Member
     
    Join Date: Nov 2009
    Posts: 1
    powerbuddy is an unknown quantity at this point (<10)
    Lightbulb Algorithm for a car race using BFS

    Ok, so here's the problem I am having. Say I have a boolean maze, where ofcourse T are the place I can traverse on and F are the areas I cannot. The goal is to find the shortest parth from 0,0 to other corner i.e. m,n corner. Well that's just the first part of it. The other problem in the mix is the car can jump between the cells and even obstacles, also the speed can be 1+ more than its previous speed. The real goal is to find a path with the shortest amount of traversed cells with jumps.

    Thinking about the problem, I can understand I can do a BFS search, but how exactly do I do a BFS search taking the shortest path with the jumps in it?
    Reply With Quote
      #2    
    Old November 22nd, 2009, 01:08 PM
    D_Drmmr's Avatar
    D_Drmmr D_Drmmr is offline
    Member
     
    Join Date: Jul 2005
    Location: Netherlands
    Posts: 442
    D_Drmmr is a jewel in the rough (200+) D_Drmmr is a jewel in the rough (200+) D_Drmmr is a jewel in the rough (200+)
    Re: Algorithm for a car race using BFS

    What do you mean with BFS search?
    Breath First Search is an algorithm to traverse a tree. So, you'll first have to define what your tree will look like. What is the information contained in each node and what are the children of each node?
    __________________
    Cheers, D Drmmr

    Please put [code][/code] tags around your code to preserve indentation and make it more readable.

    As long as man ascribes to himself what is merely a posibility, he will not work for the attainment of it. - P. D. Ouspensky
    Reply With Quote
    Reply

    Bookmarks
    Go Back   CodeGuru Forums > General Discussion > Algorithms & Data Structures


    Thread Tools Search this Thread
    Search this Thread:

    Advanced Search
    Display Modes Rate This Thread
    Rate This Thread:

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off
    Forum Jump


    All times are GMT -5. The time now is 09:55 AM.



    Acceptable Use Policy


    The Network for Technology Professionals

    Search:

    About Internet.com

    Legal Notices, Licensing, Permissions, Privacy Policy.
    Advertise | Newsletters | E-mail Offers


    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.