Skip to content

tralireza/DemoSearch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DemoSearch

BFS/DFS Search Demo - Terminal Vs iTerm2

Ghosty Logo

Why?

This was supposed to be a benchmark test for Terminal and iTerm2, but DFS/BFS searches are fun! So it demos how a clever! "ghost" finds its way in a maze. All and all I think I carry on using Terminal as I find iTerm2 a tiny bit slower for unicode (however it has lots of good features and even more to customize!)

Build

$ git clone https://github.com/tralireza/DemoSearch
$ cd DemoSearch
$ go build .

"Demo" binary should be in the current directory now. Run it! (Side NOTE: But always remember to only run executables you built or you trust.)

Run (from Source)

$ cd DemoSearch
$ go run . -h
Usage of /var/folders/8w/tjs_qsdj4x3b8y8ycn2cfb680000gn/T/go-build269568008/b001/exe/Demo:
  -BFS
    	Do a BFS search (otherwise DFS)
  -drawMaze
    	Only draw the maze & exit!
  -exits int
    	Number of doors to get out of maze (default 16)
  -i int
    	Ghosty's start row, between 2 & m-1 (default 5)
  -j int
    	Ghosty's start column, between 2 & n-1 (default 26)
  -m int
    	Number of rows in the maze (default 10)
  -n int
    	Number of columns in the maze (default 48)
  -walls int
    	Extra bricks inside of maze (default 128)

Run (binary produced by build in Build above)

$ ./Demo -h
...<^^^output as above^^^>

Screenshots

Take a look at the "screenshots" folder for more or create a PR for your screenshots to go there... Would love to know how the performance is like on your setup.

Terminal: (On my Mac, Terminal runs almost 5% to 7% cooler on CPU while the tiny "Ghosty" is finding its way out to a door!) Terminal2

(Waiting to be "Looking" into, already found doors/exits (so thumbsup to our "Ghosty") and the shortest path found (so far) stpes for the Beeline...

Terminal3


iTerm2: (It doesn't render all unicode the same width! Well Apple double width emoji to be exact but still either render all single/double width) iTerm2

Bugs, Imprevements or More Screenshots

Yes please fire a PR away. Thank you!

Terminal app on macOS > iTerm2 app on macOS

Well, I rest my case :-) ... And I think I now carry on using both! Gosh!

About

iTerm2 vs Terminal (DFS/BFS Search)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages