# About compute\_single\_action after training atari breakout

**URL:** <https://discuss.ray.io/t/about-compute-single-action-after-training-atari-breakout/8324>\
**Category:** Configure Algorithm, Training, Evaluation, Scaling\
**Created:** [November 17, 2022, 4:01am UTC](https://discuss.ray.io/t/about-compute-single-action-after-training-atari-breakout/8324 "2022-11-17T04:01:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![BlackSparrow-43](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/blacksparrow-43/32/3440_2.png) [@BlackSparrow-43](https://discuss.ray.io/u/BlackSparrow-43)\
**Post date:** [November 17, 2022, 4:01am UTC](https://discuss.ray.io/t/about-compute-single-action-after-training-atari-breakout/8324/1 "2022-11-17T04:01:21Z")

</div>

I am a newbie in the field of RL and Rllib. Right now just exploring rllib, training atari ‘breakout’. The difficulty I face is that the making the trained agent to play the game.

The First Problem is that the Agent.compute\_single\_action(obs) doesn’t automatically preprocess the (1, 210, 160, 3) atari.

So, because of that I tried to use rllibs built-in preprocessor to do so.But it converts the input format  
(1, 210, 160, 3) to (1, 84, 84, 3) but the expected input is (?, 84, 84, 4).

So, how do i framestack the frame from 3 to 4 in rllib.

```auto

prep = get_preprocessor(env.observation_space)(env.observation_space)
obs = prep.transform(observation)

```

 ![Screenshot (53)](https://us1.discourse-cdn.com/flex020/uploads/ray/original/2X/4/48ae49bc39f86c430e12bae6058d2925479bcd98.png)

And is there any other method to solve this?

Ray version==2.0.1

---

<div class="post-metadata">

**Author:** ![kourosh](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/kourosh/32/2130_2.png) [@kourosh](https://discuss.ray.io/u/kourosh)\
**Post date:** [January 5, 2023, 4:46pm UTC](https://discuss.ray.io/t/about-compute-single-action-after-training-atari-breakout/8324/2 "2023-01-05T16:46:24Z")

</div>

Hi @BlackSparrow-43,

`compute_single_action` does not do the processing for you but `compute_actions()` does. See [ray/algorithm.py at master · ray-project/ray · GitHub](https://github.com/ray-project/ray/blob/master/rllib/algorithms/algorithm.py#L1550). This is from master, so if you see any discrepancies switch to the latest version. At some point in the future we will only have one entry point so that people don’t get confused which one to use.
