VBA – A* Search Algorithm with Excel – Useful code


Ok, so some 10 years ago, I was having fun coding A* Search Algorithms in Excel in VitoshAcademy and this is what I had built back then:

VBA – A* search algorithm with Excel – Really?

VBA – A Search Algorithm with VBA – Teil Zwei

The second one is actually quite fun and I had forgotten about it. Today, I will present a third one, that has a few more features, namely the following:

  • It can be copied completely into a blank Excel’s VBA module, without any additional setup and it will work
  • You can choose for distance method (Manhattan or Heuristics)
  • You can choose for displaying or not calculations in Excel (
    writeScores = False )
  • You can
    ResetAndKeep() , which cleans out the maze, but keeps the obstacles
  • You can setup your own start and goal cell. By simply writing
    s and
    g , somewhere in the PLAYGROUND.
  • You can change the speed of writing in the Excel file, by changing the
    delay variable.

These are the current commands:



Source link

دیدگاه‌ها

دیدگاهتان را بنویسید

نشانی ایمیل شما منتشر نخواهد شد. بخش‌های موردنیاز علامت‌گذاری شده‌اند *