Skip to content

Fix MultiObjective Strategy solver #5

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

Open
MuvvalaKaran opened this issue Dec 2, 2023 · 1 comment
Open

Fix MultiObjective Strategy solver #5

MuvvalaKaran opened this issue Dec 2, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@MuvvalaKaran
Copy link
Member

When running the multiobjective solver in the examples directory, I get the following error.

TypeError                                 Traceback (most recent call last)
Cell In[9], line 1
----> 1 solver = MultiObjectiveSolver(game,
      2                             epsilon=1e-7,
      3                             max_iteration=300,
      4                             stochastic=stochastic,
      5                             adversarial=adversarial)
      6 solver.solve(plot_strategies=plot_strategies,
      7                 plot_graph_with_strategy=plot_graph_with_strategy,
      8                 plot_graph_with_pareto=plot_graph_with_pareto,
   (...)
     12                 view=view,
     13                 format=format)

File ~/Documents/research/regret_syn_toolbox/regret_synthesis_toolbox/src/strategy_synthesis/multiobjective_solver.py:398, in MultiObjectiveSolver.__init__(self, game, stochastic, adversarial, epsilon, round_decimals, round_label_decimals, max_iteration)
    395 self._notconverged_state = None
    396 self._count = 1
--> 398 self._initialize(game)

File ~/Documents/research/regret_syn_toolbox/regret_synthesis_toolbox/src/strategy_synthesis/multiobjective_solver.py:414, in MultiObjectiveSolver._initialize(self, game)
    411     raise Exception(f"{init_node} not in the system's winning region")
    412 self._game.delete_selfloops()
--> 414 self._upperbounds = self._compute_upperbound_for_pareto_points()
    416 self._pareto_fronts = None
    417 self._strategies = None

File ~/Documents/research/regret_syn_toolbox/regret_synthesis_toolbox/src/strategy_synthesis/multiobjective_solver.py:431, in MultiObjectiveSolver._compute_upperbound_for_pareto_points(self)
    429 for name in self._game.weight_types:
    430     weights = [e[2]['weights'].get(name) for e in self._game._graph.edges.data() if 'weights' in e[2]]
--> 431     max_single_weight = max(weights)
    432     max_weights.append(max_depth * max_single_weight)
    434 return max_weights

TypeError: '>' not supported between instances of 'list' and 'int'

To reproduce this error, checkout the branch fix/wombats_examples where I already added wombats library as a submodule. Further, I updated the dockerfile and updated the graph_factory.get('ProductGraph', ...) function signature with pdfa_compose= True flag.

@MuvvalaKaran MuvvalaKaran added the bug Something isn't working label Dec 2, 2023
@MuvvalaKaran
Copy link
Member Author

@watakandai just a reminder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants