da03fd1bde5d2d4836e11def61d19dcc2d4c2b6b,flow/envs/two_loops_one_merging.py,TwoLoopsOneMergingEnvironment,get_state,#TwoLoopsOneMergingEnvironment#,61

Before Change


        positions on the edge, for each vehicle.
        
        vel = self.vehicles.get_speed(self.sorted_ids)
        pos = self.sorted_extra_data[0]
        edge = self.sorted_extra_data[1]
        max_speed = self.max_speed
        is_rl = [int(veh_id in self.vehicles.get_rl_ids())
                 for veh_id in self.sorted_ids]

        // divide the values by the maximum attainable speed

After Change


        // return np.mean(self.vehicles.get_speed())
        return rewards.desired_velocity(self, fail=kwargs["fail"])

    def get_state(self, **kwargs):
        
        See parent class.

        The state is an array the velocities, edge counts, and relative
        positions on the edge, for each vehicle.
        
        vel = self.vehicles.get_speed(self.sorted_ids)
        pos = [self.get_x_by_id(veh_id) for veh_id in self.sorted_ids]
        // is_rl = [int(veh_id in self.rl_ids) for veh_id in self.sorted_ids]

        // // normalize the speed
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: flow-project/flow
Commit Name: da03fd1bde5d2d4836e11def61d19dcc2d4c2b6b
Time: 2018-01-01
Author: cathywu@eecs.berkeley.edu
File Name: flow/envs/two_loops_one_merging.py
Class Name: TwoLoopsOneMergingEnvironment
Method Name: get_state


Project Name: flow-project/flow
Commit Name: da03fd1bde5d2d4836e11def61d19dcc2d4c2b6b
Time: 2018-01-01
Author: cathywu@eecs.berkeley.edu
File Name: flow/envs/two_loops_one_merging.py
Class Name: TwoLoopsOneMergingEnvironment
Method Name: get_state


Project Name: flow-project/flow
Commit Name: c18e993f595d3b82b48eb29d9e83311874b98129
Time: 2018-01-01
Author: cathywu@eecs.berkeley.edu
File Name: flow/envs/two_loops_one_merging.py
Class Name: TwoLoopsOneMergingEnvironment
Method Name: get_state


Project Name: flow-project/flow
Commit Name: dbfaf9fe0d354bfcf2dcb7d0c688a5463ab1a518
Time: 2018-01-16
Author: akreidieh@gmail.com
File Name: flow/envs/base_env.py
Class Name: Env
Method Name: _reset