Vector Rally

A place to discuss the implementation and style of computer programs.

Moderators: phlip, Moderators General, Prelates

Grosie
Posts: 7
Joined: Fri Jun 11, 2010 11:57 pm UTC

Vector Rally

Postby Grosie » Sun Jul 11, 2010 1:08 pm UTC

I have challenged myself to create a program that solves a vector rally course that is fed into it. (Wiki: http://en.wikipedia.org/wiki/Racetrack_%28game%29)

I am building this in C# at the moment, because that is the language that I am most familiar with, but I have hit some stumbling blocks. I am using a brute force method (probably the wrong way...) but there is an obvious problem with this (see attachment)

I have seen a perfectly intelligent AI in several places on the internet, but I can't fathom how it's done. Before I describe in detail my method, I would like to see what the community can come up with (I wouldn't mind starting again if I had to, but would still like to use C#)

Thanks in advance.
Attachments
needs_optimisation.JPG
Black is wall, green is start, red is end, orange and yellow lines are the path taken by the AI.

the.coding.eye
Posts: 52
Joined: Thu Apr 16, 2009 4:56 am UTC
Contact:

Re: Vector Rally

Postby the.coding.eye » Sun Jul 11, 2010 5:36 pm UTC

I've never implemented it before (and haven't read enough to fully understand it), but the A* Search algorithm might be the way to go.
"In theory, theory and practice are the same. In practice, they are not."


Return to “Coding”

Who is online

Users browsing this forum: Bing [Bot] and 8 guests