很短,interraction = ''.join(env_list)这是什么意思
def create_environment(state_x,state_y,episode,step_counter,table):'''
就是创建游戏的简单画面,定义游戏的移动等
'''
env_list = [['#', '#', '#', '#'] ,
['#', '&', '&', '#'] ,
['#', '&', '@', '#'] ,
['#', '#', '#', '#'] ]
if state_x == 1000:
interraction = 'episode %d: total step_step_move: %d'%(episode + 1,step_counter)
print('\r{}'.format(interraction),end = '')
time.sleep(2)
print('\r ',end = '')
else:
env_list = 'O'
interraction = ''.join(env_list)
print('\r{}'.format(interraction),end = '')
time.sleep(Fresh_time) 就是把env_list中的元素合并了,赋值给interraction
页:
[1]