Skip to content

vyrwu/a-star-redblob

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Releases

No releases published

Packages

No packages published

Languages