Skip to content

Inc nn agent - #7

Open
jmorzel wants to merge 4 commits into
mainfrom
inc_nn_agent
Open

Inc nn agent#7
jmorzel wants to merge 4 commits into
mainfrom
inc_nn_agent

Conversation

@jmorzel

@jmorzel jmorzel commented Jul 15, 2022

Copy link
Copy Markdown
Collaborator

No description provided.

@jmorzel
jmorzel requested a review from hlfshell July 15, 2022 02:49
Comment thread traffic_agent/averaged_nn_agent.py Outdated

def step(self, simulation: Simulation):
durations: List[float] = None
changes: List[float] = None

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the changes on averaged_nn_agent at all?

)


# standard sigmoid activation function

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unneeded

return 1/(1+np.exp(-input))


# Standard relu

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just import from activation_functions

Comment thread traffic_agent/sumo.py
traci.trafficlight.setPhase(id, phase + 1)
else:
traci.trafficlight.setPhase(id, 0)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excessive spacing - use a linter.

Comment thread traffic_agent/sumo.py Outdated
"duration": duration,
"state": state
"state": state,
"cntr" : 0

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this do? Why is it shorthand?

Comment thread traffic_agent/sumo.py
phase = traci.trafficlight.getPhase(id)

# Hardcoded for Chicago 02 sim
if id == "J02" or id == "J05" or id == "J08" :

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No no no - if you can't do it dynamically don't hardcode. Not acceptable

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

Successfully merging this pull request may close these issues.

2 participants