Code Monkey home page Code Monkey logo

astar's Introduction

Hi πŸ‘‹, I'm Torsten

I'm a physicist and software developer with a passion for CLIs and backends.

  • πŸ”­ At the moment, I am developing a customised home automation solution.
  • 🌱 I’m currently learning Rust and Haskell. I'm also learning about Arduinos.
  • πŸ’¬ Ask me about physics, computational quantum mechanics, Linux, shell scripts, software testing, Golang, CLIs, GitHub Actions, ...
  • πŸ“« You can reach me by opening an issue and @-mentioning me here.
  • ⚑Fun fact: I walk around in sandals or without shoes all year round, everywhere. πŸ‘£ 🦢🦢

Languages, tools, and platforms that I enjoy using:

neovim git golang haskell rust python bash mint linux firefox inkscape raspi

astar's People

Contributors

github-actions[bot] avatar razziel89 avatar

Watchers

 avatar  avatar

astar's Issues

Release 0.3.0

Close these first:

Possibly even implement these, but they can also be moved to the next release:

Convenience graph creators

Creating regular graphs is not too easy right now. It would be cool to be able to create graphs from regular grids with minimal commands.

Features:

  • Provide grid size in all dimensions
  • Provide metric function used to determine whether two nodes are neighbours (requires iteration over entire grid for every point, which is inefficient)
  • Provide list of displacements to reach neighbours (remember to track node positions in the creation algorithm, this is very similar to the example in the readme)
  • Take function that retrieves cost for each node, allow nil, in which case the cost will have to be set manually
  • Take name creator function
  • Make sure to add position as payload

Logo

Every project needs a logo these days having one would be cool! Should be a vector graphics in an open format such as svg.

Use binary heap

The current implementation that simply iterates over a graph is not as efficient as using a binary heap. Implement a binary heap. To keep the number of dependencies low, implement it here as a sub-package.

Assess speed up due to heap structure

The current implementation that simply iterates over a graph is not as efficient as using a binary heap. Assess speed up by using a heap structure.

Greatly improve speed up by making nodes aware of which graph they are in. That way, a node can only be in one graph, but that's OK as it greatly improves performance. We will get rid of the map entirely.

Release 0.1.0

Release 0.1.0, which will no longer be an alpha version.

Close these first:

Moved to next release:

Replace nodes by interface

In order to support different types of nodes, they should be replaced by an interface. That interface needs at least the following:

  • getters (and possibly setters) for currently public members
  • a getter for connecting nodes (required for on-demand creation of nodes based on some algorithm)

Support on-the-fly node creation

There are cases when the approach of first creating all nodes and then finding a path through them is not ideal, e.g. when the possible number of nodes is so large that they do not all fit in memory. Instead, nodes can be created programmatically. That is, a new type of node implementing the node interfaces (cf. #19) can be created whose Connections method then provides all nodes. There is one major challenge here: currently, nodes are identified uniquely via pointers to them. When programmatically creating neighbouring nodes, some other means of uniquely ID'ing nodes is required. Suggestion: require unique names that follow some scheme, or require some hashing function that generates an ID based on a node. Implementing this without generics can be tricky. With generics, the ID type can be specified by the user as long as the ID method returns data of that type. Maybe wait until go 1.18 has been released to employ generics.

Requires these:

Provide implementation details in README

The README currently provides one example but not a lot of details about the different parts of the code base and what they do. That should be changed. The details could even be put into a separate file linked to from within the README.

Provide documentation on GitHub pages

All code is documented and there is a README. But all that documentation does not yet live within HTML documents accessible via GitHub pages. That should be changed.

Test one way connections

The implementation supports one way connections, but the feature is not yet tested in any way. Test it.

Do not modify nodes during path finding

Currently, the algorithm modifies nodes during path finding. That can be avoided by storing as many of the private members as possible in the graph in some form. That way, nodes don't have to be reset after path finding and they can be used in multiple graphs at the same time, allowing multiple paths to be found simultaneously. This will require some major modifications to both the Graph, the HeapedGraph, and the path-finding algorithm itself. Quite possibly, the GraphOps interface will have to be extended or modified. The interfaces recommended to users should stay in tact, though.

Fix cost update test

Actually check whether an update of the tracked cost has happened:

See astar_test.go.

Attempt parallelisation

Goroutines can be used to speed up the algorithm. Try that.

To check that the code always works, leave concrete examples in place. Also add one large example that can be used as a performance measure.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.