A system comprising: one or more computer processors (103, 105); one or more computer memories; a set of instructions incorporated into the one or more computer memories, the set of instructions configuring the one or more computer processors to perform operations comprising: determining a dominant atom from a set of active atoms associated with a character based on weights associated with the set of active atoms, each atom of the set of active atoms including a reference to data defining a character pose within a motion library; determining a motion controlling ability from a plurality of abilities of the character based on priorities of the abilities and a current game state produced within a game; determining a motion fragment for the dominant atom based on data in the motion library, said data being pose data and future trajectory data associated with the dominant atom; calculating, using a trajectory prediction neural network, a predicted future trajectory of the character based on the motion fragment, the controlling ability, and control data from an input device; based on a detection of a future collision or problem between the predicted future trajectory and an environment within the game, calculating a combined future trajectory based on the predicted future trajectory and an additional future trajectory; determining a combined motion fragment by replacing the future trajectory of the motion fragment with the predicted future trajectory or combined future trajectory; converting the combined motion fragment to a hash value using a hashing function that preserves similarities between pairs of motion fragments and using a nearest neighbor search to find the closest match between the hash value and a second hash value in the motion library; adding the atom associated with the second hash value to the set of active atoms as a target atom; posing the character in a frame based on a weighted combination of poses associated with the set of active atoms; and changing the weights associated with the set of active atoms based on a time function, the changing including increasing the weight of the target atom and decreasing the weight of all other atoms. one or more computer processors (103, 105); one or more computer memories; a set of instructions incorporated into the one or more computer memories, the set of instructions configuring the one or more computer processors to perform operations comprising: determining a dominant atom from a set of active atoms associated with a character based on weights associated with the set of active atoms, each atom of the set of active atoms including a reference to data defining a character pose within a motion library; determining a motion controlling ability from a plurality of abilities of the character based on priorities of the abilities and a current game state produced within a game; determining a motion fragment for the dominant atom based on data in the motion library, said data being pose data and future trajectory data associated with the dominant atom; calculating, using a trajectory prediction neural network, a predicted future trajectory of the character based on the motion fragment, the controlling ability, and control data from an input device; based on a detection of a future collision or problem between the predicted future trajectory and an environment within the game, calculating a combined future trajectory based on the predicted future trajectory and an additional future trajectory; determining a combined motion fragment by replacing the future trajectory of the motion fragment with the predicted future trajectory or combined future trajectory; converting the combined motion fragment to a hash value using a hashing function that preserves similarities between pairs of motion fragments and using a nearest neighbor search to find the closest match between the hash value and a second hash value in the motion library; adding the atom associated with the second hash value to the set of active atoms as a target atom; posing the character in a frame based on a weighted combination of poses associated with the set of active atoms; and changing the weights associated with the set of active atoms based on a time function, the changing including increasing the weight of the target atom and decreasing the weight of all other atoms.