docstr: Test whether DQN can be built on all frameworks.
  Unlike the previous test, this uses an environment with integer rewards
  in order to test that type conversions are working correctly.
docstr_tok: ["Test","whether","DQN","can","be","built","on","all","frameworks",".","Unlike","the","previous","test",",","this","uses","an","environment","with","integer","rewards","in","order","to","test","that","type","conversions","are","working","correctly","."]
code: def test_dqn_compilation_integer_rewards(self):
      """Test whether DQN can be built on all frameworks.
      Unlike the previous test, this uses an environment with integer rewards
      in order to test that type conversions are working correctly."""
      num_iterations = 1
      config = (
          dqn.dqn.DQNConfig()
          .environment("Taxi-v3")
          .rollouts(num_rollout_workers=2)
          .training(num_steps_sampled_before_learning_starts=0)
      )
  
      for _ in framework_iterator(config):
          # Double-dueling DQN.
          print("Double-dueling")
          algo = config.build()
          for i in range(num_iterations):
              results = algo.train()
              check_train_results(results)
              print(results)
  
          check_compute_single_action(algo)
          algo.stop()
  
          # Rainbow.
          print("Rainbow")
          rainbow_config = deepcopy(config).training(
              num_atoms=10,
              noisy=True,
              double_q=True,
              dueling=True,
              n_step=5,
          )
          algo = rainbow_config.build()
          for i in range(num_iterations):
              results = algo.train()
              check_train_results(results)
              print(results)
  
          check_compute_single_action(algo)
  
          algo.stop()
  
file_path: ray/rllib/algorithms/dqn/tests/test_dqn.py
imports: from copy import deepcopy
  import numpy
  import unittest
  import ray
  import ray.rllib.algorithms.dqn
  from ray.rllib.utils.test_utils import check, check_compute_single_action, check_train_results, framework_iterator
label_desc: Use image node_id 4 for calling the TestDQN obj's underlying member method code with example usage: obj.test_dqn_compilation_integer_rewards() without return types