Artificial Intelligence Tools Extension (Beta Release 8)

merrak

  • *
  • Posts: 1958
Glad to hear it was helpful :)

Let me know if you run into any bugs/issues.

Quick update on the status of this extension: I have been sitting on Beta Release 4 for a while, which would add an implementation of Prim's Algorithm. For those unfamiliar with that that does--I used it as part of a terrain generation procedure; the algorithm is often cited in maze generators.

LIBERADO

  • *
  • Posts: 2569
I have been sitting on Beta Release 4 for a while, which would add an implementation of Prim's Algorithm.
Great news!
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.

merrak

  • *
  • Posts: 1958
I've uploaded Beta Release 4, which adds a lot of new functionality! Highlights include:

  • More tools to work with nodes (delete, rename, etc.)
  • More tools to work with edges (delete, rename, set/get cost, etc.)
  • Implementation of Prim's Algorithm. Example output and relevant discussion can be found in this thread.

All new blocks:

























Documentation can be found at my site.

As usual, please let me know if you run into any bugs, etc.

LIBERADO

  • *
  • Posts: 2569
Great! Downloaded and installed. Thank you very much!
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.

hoss08

  • Posts: 19
This is awesome! Thanks merrak :)

yoplalala

  • *
  • Posts: 1456
Using it . Awesome :) Thanks merrak !

merrak

  • *
  • Posts: 1958
Glad to hear it's been useful :) Let me know if you run into any issues.

Macroplasm

  • Posts: 35
I have a pathfinding  behavior set up yet it seems to work slow when there's a large amount of tile present in the scene.

merrak

  • *
  • Posts: 1958
I have a pathfinding  behavior set up yet it seems to work slow when there's a large amount of tile present in the scene.

The larger and more complex the graph is, the longer a search will take. Unfortunately, there's no getting around that--but there ought to be ways to optimize either your code or mine.

Make sure you don't search for a path unless it's absolutely necessary. If you're doing something like searching in an update event, try finding a way to reuse the previous result as much as possible. You might also be able to break down the map into smaller chunks, and search only within the chunk.

One way you can optimize the code in the extension is to modify the costEstimate function. See this page in the documentation and the reference it cites. In particular, note the "Speed or accuracy?" discussion. Keep in mind that I wrote a one-size-fits-all kind of extension that provides an "okay" solution to a wide variety of problems at the expense of not being a "great" solution to one particular problem. That website I linked was my main reference while writing the extension--so if you want to tweak it to better suit your purposes, reading through that post would be the best place to start.

Not knowing the details on what you're trying to accomplish, I'm afraid that's about as helpful as I can be.

Bhoopalan

  • Posts: 1009
Your tools are awesome. Going to download and explore it!! Thanks Merrek.
If I helped you at anytime, help me back build my twitter followers :)
https://twitter.com/imbhoopalan

Macroplasm

  • Posts: 35
I  found a work around. I made it so tiles spawn on two layers at first then set it so the  tiles on the "0" layer are removed after the NPC makes a graph of the area.The second layer of tiles are left over for mostly visual effect.

merrak

  • *
  • Posts: 1958
Quick update-- Beta Release 5 includes a couple of bug fixes to the blocks.xml file. The block "defined graphs" should no longer produce a compiler error.

LIBERADO

  • *
  • Posts: 2569
Let me know if you run into any issues.
Return "NaN" with a list of nodes.
Doesn't detect existing connections.
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.

merrak

  • *
  • Posts: 1958
Return "NaN" with a list of nodes.
Doesn't detect existing connections.

Do you have a sample script I could use to reproduce the errors?

LIBERADO

  • *
  • Posts: 2569
Do you have a sample script I could use to reproduce the errors?
Yes, it is attached to this post. Please, check it and see the Drawing event.
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.