#NEWLINE# @ overrides #NEWLINE# def compute_reward( self , action ) : #NEWLINE# #INDENT# ( yield ) #NEWLINE# tgt_pos = np . asarray ( [ 0 , ( self . link_len * 2 ) ] ) #NEWLINE# cur_pos = self . get_tip_pos ( ) #NEWLINE# dist = np . linalg . norm ( ( cur_pos - tgt_pos ) ) #NEWLINE# ( yield ( - action ) )