Visitar URL original
Proposal/Ideas of things to add · Issue #45 · OmkarPathak/pygorithm · GitHub
The Wayback Machine - https://web.archive.org/web/20201030070445/https://github.com/OmkarPathak/pygorithm/issues/45
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal/Ideas of things to add #45

Closed
IanDoarn opened this issue Aug 21, 2017 · 23 comments
Closed

Proposal/Ideas of things to add #45

IanDoarn opened this issue Aug 21, 2017 · 23 comments

Comments

@IanDoarn
Copy link
Contributor

@IanDoarn IanDoarn commented Aug 21, 2017

Proposals / Ideas

'bad title'

I'd like to propose some things that should be added to this! I'm by no means advanced enough to understand some things here (stacks, heaps, A-star), but I definitely thing we should expand to even more examples as well as other things!

Please read this and let me know if any seem like good/bad ideas!!

Data Structures


  • Hash Maps / Hash Tables
  • Binary Heap
  • Matrix

Math


  • Factorial
  • PI
  • Summation
  • Sequences?
  • Common formulas: Quadratic, slope, distance, ect.
  • Binary Conversion: bin to hex, bin to ascii, ascii to hex, ect
  • Union
  • Partition

Geometry


  • Collision detecion
  • Euclidean Distance
  • Triangluation
  • Maxmimum Area

Others


  • Physics?
  • Iteration

These are just some idea's I;ve have had, feel free to let me know if this is anything interesting!

@OmkarPathak
Copy link
Owner

@OmkarPathak OmkarPathak commented Aug 21, 2017

Seems great. These ideas are surely great. We will try to implement each possible algorithm. Thank you!

@OmkarPathak
Copy link
Owner

@OmkarPathak OmkarPathak commented Aug 21, 2017

Feel free to place these in TODO.md

@Tjstretchalot
Copy link
Contributor

@Tjstretchalot Tjstretchalot commented Aug 21, 2017 •

I can definitely help with the collision detection algorithms and arcade physics (for the complicated physics Box2D is pretty legible).

Other things I was going to work on first was:

  • Bidirectional A* - it's very rarely worth it to use bidirectional algorithms but having one in there can be helpful
  • Concave polygons. These will be placeable on the grid and are necessary to test the quadtree
  • Quadtree Grid
  • Figure out a way to make the A* algorithms also work on the grid, or make a version that works on the grid, since that's probably a more common usecase than on graphs because its much more memory efficient
  • Visualizer? Graphical visualizer would probably be too intense for python but I would be willing to make a C# library that binds with the python via ironpython for visualizing these. Alternatively could just delegate to http://qiao.github.io/PathFinding.js/visual/ (though it is missing some of the fancier algorithms)
  • Theta * (this only works on certain types of grids things)
  • Lazy Theta * - probably best algorithm to use for 2D games
  • Jump point search - this algorithm is nearly useless in practice (only uniform grids with point-particle entities) but is pretty neat to watch
  • D* (both variants) - these two algorithms are strictly worse than D* Lite but provide historical context
  • D* Lite - best algorithm for robots on a flat plane (or at least where you can ignore elevation)
@IanDoarn
Copy link
Contributor Author

@IanDoarn IanDoarn commented Aug 21, 2017

@Tjstretchalot a visualizer would be nice but what about users on Mac? And there are libriaries for visualizing in python, at least i think. A better option would be to build a module in C++/C which I could probably whip up!

@OmkarPathak
Copy link
Owner

@OmkarPathak OmkarPathak commented Aug 21, 2017

@Tjstretchalot @IanDoarn I can help with Math implementations. I have some pseudo codes available for the same.

@Tjstretchalot
Copy link
Contributor

@Tjstretchalot Tjstretchalot commented Aug 21, 2017 •

@IanDoarn I was thinking IronPython with Mono which is cross-platform. I'm not sure if you've tried the python GUI libraries but they are pretty terrible. They aren't even particularly pythonic, so there's no language advantage there. Going from Python to C++/C seems like an overkill jump where C# would suffice fine, but if you want to do that than binding with Cython will work.

In my opinion we shouldn't do anything graphics related actually in python - it's not where python shines :)

@OmkarPathak I won't be messing with those (at least for a while) so if you do you won't see any merge errors/duplicated work from me!

@IanDoarn
Copy link
Contributor Author

@IanDoarn IanDoarn commented Aug 21, 2017

@Tjstretchalot Oh I know they are aweful. Maybe the visualizer should wait for awhile, and prioritize the main focus of Pygorithms first?

But by all means I'd love to see what you could make!

@Tjstretchalot
Copy link
Contributor

@Tjstretchalot Tjstretchalot commented Aug 21, 2017

@IanDoarn Yeah perhaps it should wait. It can be hard to understand the difference between some of the algorithms without a visualizer, especially the ones with very few open-source implementations (when I google "Theta* python" no relevant links come up) but it does clutter the repo.

@Tjstretchalot
Copy link
Contributor

@Tjstretchalot Tjstretchalot commented Aug 21, 2017 •

@OmkarPathak @IanDoarn When you make the binary heap add a search function (it's not in the heapq implementation). It's technically the same worst case performance but should beat average case performance over a linear search because it will be able to skip subtrees. Alternatively, adding it to the current heap implementation would work as well

@IanDoarn
Copy link
Contributor Author

@IanDoarn IanDoarn commented Aug 23, 2017

@Tjstretchalot @OmkarPathak I can work on basic binary conversions between bases

@sharadbhat
Copy link
Contributor

@sharadbhat sharadbhat commented Aug 24, 2017

How about algorithms like 0/1 Knapsack and Greedy Knapsack?
I can help with it, if it is worth adding.

@OmkarPathak
Copy link
Owner

@OmkarPathak OmkarPathak commented Aug 25, 2017

@sharadbhat you can help with greedy knapsack. I am halfway on 0/1 knapsack

@sharadbhat
Copy link
Contributor

@sharadbhat sharadbhat commented Aug 25, 2017

@OmkarPathak I'll get started on it.

@OmkarPathak
Copy link
Owner

@OmkarPathak OmkarPathak commented Aug 26, 2017

@IanDoarn can you add some tests for binary conversion?

@IanDoarn
Copy link
Contributor Author

@IanDoarn IanDoarn commented Aug 26, 2017

@OmkarPathak I can

@Tjstretchalot
Copy link
Contributor

@Tjstretchalot Tjstretchalot commented Aug 31, 2017

#61 is relevant to this thread

@utkarshyadavin
Copy link

@utkarshyadavin utkarshyadavin commented Oct 2, 2017

@OmkarPathak I can help in in implementing leaf count algo in tree/data structures.

@OmkarPathak
Copy link
Owner

@OmkarPathak OmkarPathak commented Oct 3, 2017

@utkarshyadavin that would really be great. Go on. I am waiting for the PR

@quocdat32461997
Copy link
Contributor

@quocdat32461997 quocdat32461997 commented Feb 27, 2018

How about calculating cubic equation?

@shivg7706
Copy link

@shivg7706 shivg7706 commented Mar 1, 2018

@IanDoarn @OmkarPathak Can we add Project Euler problems in python.

@SaashaJoshi
Copy link

@SaashaJoshi SaashaJoshi commented Jul 19, 2018

Find the time taken to process the algorithm?

@OmkarPathak
Copy link
Owner

@OmkarPathak OmkarPathak commented Jul 20, 2018

@SaashaJoshi idea seems good. But the problem is each algorithm would take different timestamps to execute depending on the underlying hardware. Also, there are many modules like timeit which are specifically made for calculating execution time. If you still feel that we should include time taken to process the algo, open a PR and we would think about it 😄

@SaashaJoshi
Copy link

@SaashaJoshi SaashaJoshi commented Jul 20, 2018

@OmkarPathak the time taken would definitely depend on the hardware but maybe we can further generalize an algorithm which can compare the efficiency of different computer hardware or in specific the processors in the field of data science or more elaborately machine / deep learning.
PS: I'm new to such topic of discussion but i'll surely open a PR!

@IanDoarn IanDoarn closed this Sep 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
8 participants
You can’t perform that action at this time.