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

Design a restriction so that one phase can only occur immediately after a specified phase. #208

Open
jackli100 opened this issue Jul 25, 2024 · 1 comment

Comments

@jackli100
Copy link

Dear LucasAlegre,

I would like to ask you a question.

How can I adjust the code so that certain specific phases must occur after particular phases? For example, green phase 3 can only appear after green phase 2. Do you have any suggestions? Should I use conditional statements to dynamically modify the action space, or should I add a significant penalty when the agent selects an incorrect phase combination?

This scene is set up to add a dedicated turning phase in the two-stage model.

Thanks.

@LucasAlegre
Copy link
Owner

Hi @jackli100,

I think both approaches could work. Adding the penalty is probably easier to implement, but in case you have many constraints maybe it would be better to change the TrafficSignal class and change the logic of the action space.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants