2a440f96963d19bd6ef814b7809d0e8cdec5f7f1,examples/sim_L2M2019_control.py,,,#,5

Before Change



total_reward = 0
t = 0
for i in range(timstep_limit):
    t += sim_dt
    //import pdb; pdb.set_trace()
    //observation, reward, done, info = env.step(np.ones(locCtrl.n_par), project = True)
    observation, reward, done, info = env.step(params, project = True)
    total_reward += reward
    obs_dict = env.get_observation_dict()
    if done:
        break

// visualize v_tgt --------------------------------------------------------------
    if flag_visualize_vtgt and i%20==0:
        if env.flag_new_v_tgt_field:
            q0.remove()
            X = vtgt_obj.map[0]
            Y = vtgt_obj.map[1]
            U = vtgt_obj.vtgt[0]
            V = vtgt_obj.vtgt[1]
            R = np.sqrt(U**2 + V**2)
            q0 = axes[0].quiver(X, Y, U, V, R)
            axes[0].axis("equal")

        pose = env.pose            
        axes[0].plot(pose[0], pose[1], "k.")
        
        X, Y = vtgt_obj._generate_grid(vtgt_obj.rng_get, vtgt_obj.res_get)
        U = env.v_tgt_field[0]
        V = env.v_tgt_field[1]
        R = np.sqrt(U**2 + V**2)
        axes[1].clear()
        axes[1].quiver(X, Y, U, V, R)
        axes[1].plot(0, 0, "k.")
        axes[1].axis("equal")
        
        plt.pause(0.0001)
// visualize v_tgt --------------------------------------------------------------

print("    score={} time={}sec".format(total_reward, t))

// visualize v_tgt --------------------------------------------------------------
if flag_visualize_vtgt:

After Change


try:
    for line in xrecentbest:
        pass
    last = np.fromstring(line, sep=" ")
    params = last[5:]
except:
    pass
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: stanfordnmbl/osim-rl
Commit Name: 2a440f96963d19bd6ef814b7809d0e8cdec5f7f1
Time: 2019-05-12
Author: ssm0445@gmail.com
File Name: examples/sim_L2M2019_control.py
Class Name:
Method Name:


Project Name: onnx/onnxmltools
Commit Name: 5f18a61b64456ea0cfbfc0448d493beff82aa1a4
Time: 2018-10-30
Author: Li.Steven@microsoft.com
File Name: onnxmltools/utils/float16_converter.py
Class Name:
Method Name: convert_tensor_float_to_float16


Project Name: biocore/scikit-bio
Commit Name: 7f20bc80922c8f24ceece7e335750655179090d2
Time: 2015-04-29
Author: ebolyen@gmail.com
File Name: skbio/io/_base.py
Class Name:
Method Name: _decode_qual_to_phred