项目作者: jeromew21

项目描述 :
reactjs visualization of the gale-shapley algorithm
高级语言: JavaScript
项目地址: git://github.com/jeromew21/stable-marriage.git
创建时间: 2018-09-23T01:14:20Z
项目社区:https://github.com/jeromew21/stable-marriage

开源协议:MIT License

下载


Stable Marriage Visualizer

The Gale-Shapley algorithm is fairly straightforward, so this didn’t take me that long to write.

Online at http://jerome.cloud/stable-marriage/

Featuring draggable preference lists, custom (or random) names, and stepping through the algorithm.

Why React?

React is an interesting framework. Working with pure state is very powerful but forces you to think in a particular way —- that the visual of your program is a function of the execution state (an object) of your program. So everything has to represented as a discrete state. This lends itself well to an algoritm like GS.

The drawbacks of React are 1) the stateful paradigm is kind of limited, doing dynamic stuff like changing the number of elements to be rendered feels hacky and dangerous and 2) it’s a resource monster 3) there are a lot of gotchas that make debugging pretty nasty

Features to add

  • More functionality (Being able to move back a day in execution)
  • More visuals (Think crossing out rejected proposers, examine each player’s details, adding headshots for each player)