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

Provide simple example on a graph problem #77

Open
LianhaoYin opened this issue May 9, 2023 · 4 comments
Open

Provide simple example on a graph problem #77

LianhaoYin opened this issue May 9, 2023 · 4 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@LianhaoYin
Copy link

Is it possible to provide a simple example of a graph problem such as a travel salesman problem?

@bengioe bengioe added enhancement New feature or request good first issue Good for newcomers labels May 9, 2023
@bengioe
Copy link
Collaborator

bengioe commented May 9, 2023

Should be possible, I'm not too familiar with standard TSP benchmarks, like say the distribution of pairwise distances. Are there widely recognized libraries that generate these? Or perhaps some standard distribution people sample from?

@LianhaoYin
Copy link
Author

Thanks for your response. I was thinking about a simple case like the grid environment. A graph with a few nodes and attributes to the edges, for example in the following image:
image.

In the beginning, there are no edges and the task is to add edges to connect A to F with the shortest path. The reward will be the inverse of the path length in this case. One can also change the reward function to change it a more general graph. If it is not that clear, I can create a simple Env class in a separate branch and we can work together.

@bengioe
Copy link
Collaborator

bengioe commented May 10, 2023

Yes that should be straightforward enough. You may want to take inspiration from this simple environment (it's still in a branch but I'm hoping to clean it up and merge all of this eventually).
If you start a PR/branch I'm happy to give feedback.

@zdhNarsil
Copy link

Hi @LianhaoYin, I have a code base for some graph combinatorial optimization problems (not including TSP but hopefully you may find it helpful): https://github.com/zdhNarsil/GFlowNet-CombOpt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants