                                        LLMs Can Reason Faster Only If We Let Them

problem, but the newly constructed problem at each state.             to help with mode collapse, an unwanted phenomenon that
This enables the model to learn per each transitions whether          occurs when the model exploits without enough exploration,
the whole solution was correct or not and whether Ti is in            leading to suboptimal policies (Williams & Peng, 1991;
the path that lead to the correct solution. In reward function        Ziebart et al., 2008; Mnih, 2016).
(2), we either gave negative feedback for all transitions in
                                                                      The training process samples planning problems from our
case of an incorrect solution, or gave a positive reward for
                                                                      dataset and allows the model to generate complete solutions,
all transitions when the solution was correct. However, the
                                                                      receiving rewards based on both correctness and solution
reward function in (2), also makes the distinction whether
                                                                      length. This creates a direct optimization pressure toward
a transition was indeed important for the solution of the
                                                                      finding more efficient solutions while maintaining the fun-
problem by the κ term.
                                                                      damental planning capabilities established during the SFT
                                                                      stage.
4.3. RL Training Stage
The reinforcement learning stage builds upon the supervised           5. Experimental Results
finetuning by optimizing the model for solution efficiency
while maintaining correctness. The core objective is to               We evaluate AoT-O3 across two challenging planning bench-
maximize the expected reward under the policy distribution:           marks: Game of X and N-Puzzle. Our experiments utilize
                                                                      three open-source models of varying sizes: Gemma2-2B,
                                                                    Llama3-1B, and Llama3-3B. We compare our approach
      LRL (θ) = Ex∼D Ey∼πθ (·|x) [ETi ∈y V (Ti , y)]       (5)        against two baselines: traditional Chain-of-Thought with su-
                                                                      pervised fine-tuning (CoT-SFT) and Algorithm of Thoughts
where D is the dataset of problems, πθ represents the lan-            with supervised fine-tuning (AoT-SFT). Our evaluation fo-
guage model being trained, x represents the input planning            cuses on both solution accuracy and efficiency, measured by
problem, and R(·, ·) is our length-aware reward function              the number of reasoning steps required to reach a solution.
that balances solution correctness with efficiency defined in
(2).                                                                  5.1. Problem Setups

This optimization can be accomplished through various RL              Game of X. We introduce a generalized variant of the
algorithms developed for language models. Trust Region                Game of 24, which presents a significantly more challeng-
Policy Optimization (TRPO) (Schulman et al., 2015), Prox-             ing planning problem. In our version, five numbers are
imal Policy Optimization (PPO) (Schulman et al., 2017;                randomly sampled, and players must construct mathemat-
Ziegler et al., 2019; Ouyang et al., 2022) and REINFORCE              ical expressions using arbitrary combinations of addition,
leave-one-out (RLOO) (Ahmadian et al., 2024) have all                 subtraction, multiplication, and division operations to reach
demonstrated success in language model alignment tasks.               a target value. This formulation creates a substantially larger
Each algorithm offers different tradeoffs between training            search space compared to the traditional Game of 24, requir-
stability, computational efficiency, and implementation com-          ing more sophisticated planning and arithmetic reasoning
plexity.                                                              capabilities.

The key distinction of our approach lies in the reward struc-         N-Puzzle. We utilize the classic 8-puzzle variant of the
ture rather than the specific RL algorithm choice. Our re-            sliding tile puzzle, where eight numbered tiles are arranged
ward function provides clear, objective feedback about both           on a 3×3 grid with one empty space. Each puzzle instance
solution correctness and length efficiency, eliminating the           is generated by starting from the goal state (tiles arranged
need for learned reward models or complex advantage esti-             in numerical order) and applying a random sequence of
mation schemes. This simplification allows us to focus on             80-120 valid moves to ensure solvability. The objective is
the core challenge of finding shorter valid solutions without         to return the tiles to their original ordered configuration by
introducing additional training complexity. In our experi-            sliding tiles into the empty space. This creates a challenging
ments later, we will utilize RLOO.                                    planning problem with a branching factor of up to 4 at each
To maintain stability during RL training, we employ a refer-          step and requires careful consideration of move sequences
ence model (the SFT model) to ensure the optimized policy             to avoid cycles or dead ends.
does not deviate too far from learned planning behaviors.
This constraint can be implemented through various mecha-             Word Ladder. We implement the classic word ladder
nisms depending on the chosen RL algorithm, such as KL di-            puzzle, where the objective is to transform one word into
vergence penalties or direct probability ratio clipping. In our       another by changing a single letter at a time, with each inter-
setting, the KL divergence has the added benefit of entropy           mediate step forming a valid English word. Our dataset is
regularization, popular in general RL setting. It is known            constructed using the NLTK base words dataset, focusing on

                                                                  7
