Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

a-star-redblob

This is a Golang implementation of RedBlobGames A* algorithm from tutorial article.

To run, execute:

$ go build . 
$ ./a-star-redblob

Examplary terminal output:

 .  .  .  .  .  .  .  .  .  .   | S start                                               
 .  .  .  .  .  .  .  .  .  .   | G goal                                                
 .  .  .  .  ^  ^  ^  .  .  .   | * path step                   
 .  .  .  .  ^  ^  ^  .  .  .   | ^ woods (costs 5 to step into)
 .  G  .  .  ^  ^  ^  .  .  .   | . roads (costs 1 to step into)
 .  *  .  .  ^  ^  ^  .  .  .   | X walls (cannot step into)    
 *  *  .  .  ^  ^  ^  .  .  .    
 *  X  X  X  ^  ^  ^  .  .  .    
 *  X  X  X  *  *  *  S  .  . 
 *  *  *  *  *  .  .  .  .  . 

Original examples were written in Python/C++/C#. The logic is almost exactly the same as in the article, I only translated it to Go. I did it while learning A* for my AI course at the university.

Anyone studying RedBlobGames tutorial can look here for reference. I highly recommend getting familiar with their work.

License MIT

About

Go implementation of A* from RedBlobGames

Topics

Resources

Releases

No releases published

Packages

No packages published

Languages