TheOdinProject / curriculum

The open curriculum for learning web development
https://www.theodinproject.com/
Other
10.14k stars 13.59k forks source link

Knights Travails: Handle the concept of a graph more explicitly with new project #28487

Open damon314159 opened 4 months ago

damon314159 commented 4 months ago

Checks

Describe your suggestion

I think that graphs are a structure that are very much swept under the rug in the current iteration of KT.

The linked list and hashmap projects have you define a class that can be used to instantiate and work with a structure, but apply no "real world" context to it. I think this makes you think abstractly about what you're representing and how.

Then you get to KT, where graphs are introduced more like an aside to the specific knight problem, and so learners aren't thinking about using a graph to solve a problem, they're thinking about a horse and trying to figure out what a graph has to do with it.

I think it could be really beneficial to make an abstract graph project, which can have the learner make a class, give it some methods and such. Then after that you can have the KT project, and the hint at the top that you will need to use a graph is much more meaningful - and serves as an example of how these abstract structures could solve a 'real' problem

I'd be up for working on this but to make it at reasonable quality is unlikely to be a speedy process

Path

Ruby / Rails, Node / JS

Lesson Url

https://www.theodinproject.com/lessons/javascript-knights-travails

(Optional) Discord Name

No response

(Optional) Additional Comments

No response

wise-king-sullyman commented 4 months ago

I strongly agree with you, I had no idea how I was supposed to have done KT until way after I finished it. I've just never been sure what to do differently about it because I think it is a very valuable project even though I've seen a lot of people with that same problem.

I like the idea of a more abstract graph project to warm up and am on board with your proposal, but before you proceed I'd like to see if any other @TheOdinProject/maintainers object.

JoshDevHub commented 4 months ago

I think it's potentially a cool idea, but I'd also be interested in seeing what this would like. One of the "challenges" maybe is that unlike the other structures talked about, graphs are very abstract and can have several different concrete implementations (which is why people can solve Knight Travails in a bunch of different ways).

damon314159 commented 4 months ago

@JoshDevHub

I think it could be like this: Introduce the topic Point at some resources to read if more detail is needed A few paragraphs describing some common implementations (adjacency matrix etc)

Assignment begins - specify the implementation they should use for the exercise I would like to write a visualiser method that displays a graph too. I think that would be really valuable, similar to pretty print in trees

henrylin03 commented 3 months ago

Contributor

Just did this problem yesterday, and had to go to Reddit and StackOverflow to have a better idea on how to solve. Looking back, what are your thoughts around:

  1. linking GeekforGeeks article - article not only tabulates the differences, but also uses the word "node" explicitly from the start, which might trigger learnings from previous lessons where you created a Node class / factory -> learner will feel familiarity and eventually come to conclusion that the "node" are positions on a chess board
  2. hint thinking towards whether the knight's movements, represented as "nodes", should be directed or undirected (like whether the knight should be able to move in a "cycle", or it is more like the hockey example (see screenshot) in the existing Khan Academy article: image
  3. hint thinking that, if directed, how the learner could visually represent that to data structures they already know (essentially how to turn the graph into a tree-like structure). think about how many maximum valid moves are available at any given position (ans: 8).
github-actions[bot] commented 2 months ago

This issue is stale because it has had no activity for the last 30 days.

CouchofTomato commented 2 months ago

My thoughts are that graphs is such a big topic we probably need more material to cover it for sure and at least one other project so I'm not against a warm up project where the focus is graph abstraction.

github-actions[bot] commented 1 month ago

This issue is stale because it has had no activity for the last 30 days.

wise-king-sullyman commented 1 month ago

@damon314159 it seems nobody has voiced opposition to the idea, is this still something you're interested in doing?

damon314159 commented 1 month ago

Yes, I'm still interested in pursuing it

wise-king-sullyman commented 1 month ago

Have at it! Thanks!

github-actions[bot] commented 1 week ago

This issue is stale because it has had no activity for the last 30 days.