• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
logicraju

DFS in a collection of computers.

6 posts in this topic

Hi everyone !

I'm a newbie in the field of AI. I am facing a situation where I have a collection of interconnected computers. I want to make a single computer perform a Depth First Search so that I get a list of Traversed nodes (comprising of all the names of the computers in the network). But, each computer is able to communicate only with its immediate neighbours.

The situation is similar to normal DFS Graph Traversal. But, each node has an adjacency list comprising of only the list of immediate neighbours.

Maybe i'm stupid. I can't figure out a way to overcome the situation.

Thanks in advance !

Regards.
0

Share this post


Link to post
Share on other sites
I don't think this is so much an (game) AI related problem. A bit of wikipedia delving starting at [url="http://en.wikipedia.org/wiki/Open_Shortest_Path_First"]OSPF [/url]might give you some ideas though?
0

Share this post


Link to post
Share on other sites
I am no expert in parallelization of algorithms, but my first thought would be to check at the beginning of each node [up to a certain depth] if there are any idle neighbors and split work with them. I would only do that up to certain depth, because the communication overhead would be more than the cost of making a search near the leaves in a single CPU.
0

Share this post


Link to post
Share on other sites
[quote name='CS_' timestamp='1355752573' post='5011688']
I don't think this is so much an (game) AI related problem. A bit of wikipedia delving starting at [url="http://en.wikipedia.org/wiki/Open_Shortest_Path_First"]OSPF[/url]might give you some ideas though?
[/quote]

Depth-first search is used for many things other than shortest path. For instance, it is used in minimax search (which is notoriously hard to parallelize). Perhaps the OP could explain what he is trying to do.

On the other hand, I think this is probably homework.
0

Share this post


Link to post
Share on other sites
The reason I mentioned OSPF as a starting point is that it is a routing protocol, which to me seems to be exactly what the OP's problem describes: independent entities requiring their own idea of their network's topology. As I said, the article might serve as inspiration. *shrug*
0

Share this post


Link to post
Share on other sites
Each node in the graph contains a list of computers traversed so far. The current computer checks to see if it is on the list. If it is, it returns the list to the caller. If not, it adds its name to the list and then passes a copy of the new list to each of its neighbours.

You want to start with one computer. So, the start computer adds its name to an empty list and calls each of its neighbours with the new list. Then continue as above.

The order that you iterate throught the list and then send will make it BFS or DFS.

This assumes a finite number of computers. Edited by Druzil
0

Share this post


Link to post
Share on other sites
It looks like CS_ and I completely misinterpreted the question. We [or at least I] thought you were trying to use a network of computers to parallelize a DFS of a graph, while you seem to be trying to obtain a list of computers by using DFS in the graph of computers.

Druzil's suggested algorithm seems fine. I would probably only pass the list to neighbors that are not on it, because it's much cheaper to make the check locally than to pass messages around. Also, remember to pass the list back to the caller when you hear back from all your neighbors.

[quote name='Druzil' timestamp='1355810232' post='5011923']
This assumes a finite number of computers.
[/quote]
That's a fairly safe assumption. :)
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0