コード例 #1
0
ファイル: run.py プロジェクト: LucasSimpson/2048_MDP_NN
		# get reward info for current state
		s, r = spm.lookup (s)

		# get move decision
		move = r.get_move ()

		print '\n' * 10
		print 'Board:'
		print g
		print 'Species match rep:'
		g_ = Game ()
		g_.state = s.get_rep ().get_state ()
		print g_
		print 'R info: %s' % r.get_rewards ()

		print 'TF jic: %s' % nn.compute (g.get_state (), g_.get_state ())
		print 'Move: %s' % move
		print 'New Board:'

		# make move
		g.process_move (move)

		print g

		w = raw_input ('Waiting...')

		# get new score
		new_score = g.get_score ()

		# calc score gain
		gain = new_score - current_score