origami icon indicating copy to clipboard operation
origami copied to clipboard

[Feature]: Dijkstra pathfinding algorithm

Open bal7hazar opened this issue 1 year ago • 1 comments

Feature Request

Implement Dijkstra's (source) algorithm for the map package.

Here: https://github.com/dojoengine/origami/tree/main/crates/map/src/helpers

Proposed Solution

No response

Alternatives

No response

Related Code

No response

Additional context

Currently the A* algorithm is implemented, having the choice to use different algorithm for specific cases could be interesting.

Try to match the A* trait for the high level usage, such as:

fn search(grid: felt252, width: u8, height: u8, from: u8, to: u8) -> Span<u8>

If the feature is accepted, would you be willing to contribute it?

  • [ ] Yes I would be willing to contribute

bal7hazar avatar Sep 16 '24 22:09 bal7hazar

I could do this at some point after the residency if no one has by then

bengineer42 avatar Sep 16 '24 22:09 bengineer42

I'd like to handle this task.

cryptogru725 avatar Jan 17 '25 18:01 cryptogru725

I’d like to resolve this.

JJScar avatar Jan 18 '25 10:01 JJScar

Is this issue still available?

Sumitpalekar avatar Jan 23 '25 09:01 Sumitpalekar

This is still available

bengineer42 avatar Jan 23 '25 09:01 bengineer42

I'd like to contribute to this issue.

cryptogru725 avatar Jan 23 '25 10:01 cryptogru725

Can I work on this, please?

JJScar avatar Jan 23 '25 11:01 JJScar

Can I try solving this issue?

sanwalsulehri avatar Jan 24 '25 16:01 sanwalsulehri

Could I take a shot at this?

7-falseparfait avatar Jan 26 '25 19:01 7-falseparfait

I'm Julio from Costa Rica and part of Dojo Coding community.

I haven't implemented Djikstra since college haha. I think it would be a fun experience for me since I'm completely new on Only Dust and also with Cairo, sounds like a challenge :).

Regarding my proposed implementation, I'd create a new file under 'origami/crates/map/src/finders' called djikstra.cairo. I'd also add a new abstraction called something like 'PathFindingAlgorithmTrait' to classify the new Djikstra and A* under a single trait.

The estimated time for implementation would be probably 3 days, I'm completely new so setting everything up will probably take me some time :(.

JuViquez avatar Jan 30 '25 02:01 JuViquez