AIXI

From HandWiki
Revision as of 14:07, 6 February 2024 by LinXED (talk | contribs) (over-write)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Short description: Mathematical formalism for artificial general intelligence

AIXI ['ai̯k͡siː] is a theoretical mathematical formalism for artificial general intelligence. It combines Solomonoff induction with sequential decision theory. AIXI was first proposed by Marcus Hutter in 2000[1] and several results regarding AIXI are proved in Hutter's 2005 book Universal Artificial Intelligence.[2]

AIXI is a reinforcement learning (RL) agent. It maximizes the expected total rewards received from the environment. Intuitively, it simultaneously considers every computable hypothesis (or environment). In each time step, it looks at every possible program and evaluates how many rewards that program generates depending on the next action taken. The promised rewards are then weighted by the subjective belief that this program constitutes the true environment. This belief is computed from the length of the program: longer programs are considered less likely, in line with Occam's razor. AIXI then selects the action that has the highest expected total reward in the weighted sum of all these programs.

Definition

AIXI is a reinforcement learning agent that interacts with some stochastic and unknown but computable environment [math]\displaystyle{ \mu }[/math]. The interaction proceeds in time steps, from [math]\displaystyle{ t=1 }[/math] to [math]\displaystyle{ t=m }[/math], where [math]\displaystyle{ m \in \mathbb{N} }[/math] is the lifespan of the AIXI agent. At time step t, the agent chooses an action [math]\displaystyle{ a_t \in \mathcal{A} }[/math] (e.g. a limb movement) and executes it in the environment, and the environment responds with a "percept" [math]\displaystyle{ e_t \in \mathcal{E} = \mathcal{O} \times \mathbb{R} }[/math], which consists of an "observation" [math]\displaystyle{ o_t \in \mathcal{O} }[/math] (e.g., a camera image) and a reward [math]\displaystyle{ r_t \in \mathbb{R} }[/math], distributed according to the conditional probability [math]\displaystyle{ \mu(o_t r_t | a_1 o_1 r_1 ... a_{t-1} o_{t-1} r_{t-1} a_t) }[/math], where [math]\displaystyle{ a_1 o_1 r_1 ... a_{t-1} o_{t-1} r_{t-1} a_t }[/math] is the "history" of actions, observations and rewards. The environment [math]\displaystyle{ \mu }[/math] is thus mathematically represented as a probability distribution over "percepts" (observations and rewards) which depend on the full history, so there is no Markov assumption (as opposed to other RL algorithms). Note again that this probability distribution is unknown to the AIXI agent. Furthermore, note again that [math]\displaystyle{ \mu }[/math] is computable, that is, the observations and rewards received by the agent from the environment [math]\displaystyle{ \mu }[/math] can be computed by some program (which runs on a Turing machine), given the past actions of the AIXI agent.[3]

The only goal of the AIXI agent is to maximise [math]\displaystyle{ \sum_{t=1}^m r_t }[/math], that is, the sum of rewards from time step 1 to m.

The AIXI agent is associated with a stochastic policy [math]\displaystyle{ \pi : (\mathcal{A} \times \mathcal{E})^* \rightarrow \mathcal{A} }[/math], which is the function it uses to choose actions at every time step, where [math]\displaystyle{ \mathcal{A} }[/math] is the space of all possible actions that AIXI can take and [math]\displaystyle{ \mathcal{E} }[/math] is the space of all possible "percepts" that can be produced by the environment. The environment (or probability distribution) [math]\displaystyle{ \mu }[/math] can also be thought of as a stochastic policy (which is a function): [math]\displaystyle{ \mu  : (\mathcal{A} \times \mathcal{E})^* \times \mathcal{A} \rightarrow \mathcal{E} }[/math], where the [math]\displaystyle{ * }[/math] is the Kleene star operation.

In general, at time step [math]\displaystyle{ t }[/math] (which ranges from 1 to m), AIXI, having previously executed actions [math]\displaystyle{ a_1\dots a_{t-1} }[/math] (which is often abbreviated in the literature as [math]\displaystyle{ a_{\lt t} }[/math]) and having observed the history of percepts [math]\displaystyle{ o_1 r_1 ... o_{t-1} r_{t-1} }[/math] (which can be abbreviated as [math]\displaystyle{ e_{\lt t} }[/math]), chooses and executes in the environment the action, [math]\displaystyle{ a_t }[/math], defined as follows [4]

[math]\displaystyle{ a_t := \arg \max_{a_t} \sum_{o_t r_t} \ldots \max_{a_m} \sum_{o_m r_m} [r_t + \ldots + r_m] \sum_{q:\; U(q, a_1 \ldots a_m) = o_1 r_1 \ldots o_m r_m} 2^{-\textrm{length}(q)} }[/math]

or, using parentheses, to disambiguate the precedences

[math]\displaystyle{ a_t := \arg \max_{a_t} \left( \sum_{o_t r_t} \ldots \left( \max_{a_m} \sum_{o_m r_m} [r_t + \ldots + r_m] \left( \sum_{q:\; U(q, a_1 \ldots a_m) = o_1 r_1 \ldots o_m r_m} 2^{-\textrm{length}(q)} \right) \right) \right) }[/math]

Intuitively, in the definition above, AIXI considers the sum of the total reward over all possible "futures" up to [math]\displaystyle{ m - t }[/math] time steps ahead (that is, from [math]\displaystyle{ t }[/math] to [math]\displaystyle{ m }[/math]), weighs each of them by the complexity of programs [math]\displaystyle{ q }[/math] (that is, by [math]\displaystyle{ 2^{-\textrm{length}(q)} }[/math]) consistent with the agent's past (that is, the previously executed actions, [math]\displaystyle{ a_{\lt t} }[/math], and received percepts, [math]\displaystyle{ e_{\lt t} }[/math]) that can generate that future, and then picks the action that maximises expected future rewards.[3]

Let us break this definition down in order to attempt to fully understand it.

[math]\displaystyle{ o_t r_t }[/math] is the "percept" (which consists of the observation [math]\displaystyle{ o_t }[/math] and reward [math]\displaystyle{ r_t }[/math]) received by the AIXI agent at time step [math]\displaystyle{ t }[/math] from the environment (which is unknown and stochastic). Similarly, [math]\displaystyle{ o_m r_m }[/math] is the percept received by AIXI at time step [math]\displaystyle{ m }[/math] (the last time step where AIXI is active).

[math]\displaystyle{ r_t + \ldots + r_m }[/math] is the sum of rewards from time step [math]\displaystyle{ t }[/math] to time step [math]\displaystyle{ m }[/math], so AIXI needs to look into the future to choose its action at time step [math]\displaystyle{ t }[/math].

[math]\displaystyle{ U }[/math] denotes a monotone universal Turing machine, and [math]\displaystyle{ q }[/math] ranges over all (deterministic) programs on the universal machine [math]\displaystyle{ U }[/math], which receives as input the program [math]\displaystyle{ q }[/math] and the sequence of actions [math]\displaystyle{ a_1\dots a_m }[/math] (that is, all actions), and produces the sequence of percepts [math]\displaystyle{ o_1 r_1 \ldots o_m r_m }[/math]. The universal Turing machine [math]\displaystyle{ U }[/math] is thus used to "simulate" or compute the environment responses or percepts, given the program [math]\displaystyle{ q }[/math] (which "models" the environment) and all actions of the AIXI agent: in this sense, the environment is "computable" (as stated above). Note that, in general, the program which "models" the current and actual environment (where AIXI needs to act) is unknown because the current environment is also unknown.

[math]\displaystyle{ \textrm{length}(q) }[/math] is the length of the program [math]\displaystyle{ q }[/math] (which is encoded as a string of bits). Note that [math]\displaystyle{ 2^{-\textrm{length}(q)} = \frac{1}{2^{\textrm{length}(q)}} }[/math]. Hence, in the definition above, [math]\displaystyle{ \sum_{q:\; U(q, a_1 \ldots a_m) = o_1 r_1 \ldots o_m r_m} 2^{-\textrm{length}(q)} }[/math] should be interpreted as a mixture (in this case, a sum) over all computable environments (which are consistent with the agent's past), each weighted by its complexity [math]\displaystyle{ 2^{-\textrm{length}(q)} }[/math]. Note that [math]\displaystyle{ a_1 \ldots a_m }[/math] can also be written as [math]\displaystyle{ a_1 \ldots a_{t-1}a_t \ldots a_m }[/math], and [math]\displaystyle{ a_1 \ldots a_{t-1} = a_{\lt t} }[/math] is the sequence of actions already executed in the environment by the AIXI agent. Similarly, [math]\displaystyle{ o_1 r_1 \ldots o_m r_m = o_1 r_1 \ldots o_{t-1} r_{t-1}o_{t} r_{t} \ldots o_m r_m }[/math], and [math]\displaystyle{ o_1 r_1 \ldots o_{t-1} r_{t-1} }[/math] is the sequence of percepts produced by the environment so far.

Let us now put all these components together in order to understand this equation or definition.

At time step t, AIXI chooses the action [math]\displaystyle{ a_t }[/math] where the function [math]\displaystyle{ \sum_{o_t r_t} \ldots \max_{a_m} \sum_{o_m r_m} [r_t + \ldots + r_m] \sum_{q:\; U(q, a_1 \ldots a_m) = o_1 r_1 \ldots o_m r_m} 2^{-\textrm{length}(q)} }[/math] attains its maximum.

Parameters

The parameters to AIXI are the universal Turing machine U and the agent's lifetime m, which need to be chosen. The latter parameter can be removed by the use of discounting.

The meaning of the word AIXI

According to Hutter, the word "AIXI" can have several interpretations. AIXI can stand for AI based on Solomonoff's distribution, denoted by [math]\displaystyle{ \xi }[/math] (which is the Greek letter xi), or e.g. it can stand for AI "crossed" (X) with induction (I). There are other interpretations.

Optimality

AIXI's performance is measured by the expected total number of rewards it receives. AIXI has been proven to be optimal in the following ways.[2]

  • Pareto optimality: there is no other agent that performs at least as well as AIXI in all environments while performing strictly better in at least one environment.[citation needed]
  • Balanced Pareto optimality: like Pareto optimality, but considering a weighted sum of environments.
  • Self-optimizing: a policy p is called self-optimizing for an environment [math]\displaystyle{ \mu }[/math] if the performance of p approaches the theoretical maximum for [math]\displaystyle{ \mu }[/math] when the length of the agent's lifetime (not time) goes to infinity. For environment classes where self-optimizing policies exist, AIXI is self-optimizing.

It was later shown by Hutter and Jan Leike that balanced Pareto optimality is subjective and that any policy can be considered Pareto optimal, which they describe as undermining all previous optimality claims for AIXI.[5]

However, AIXI does have limitations. It is restricted to maximizing rewards based on percepts as opposed to external states. It also assumes it interacts with the environment solely through action and percept channels, preventing it from considering the possibility of being damaged or modified. Colloquially, this means that it doesn't consider itself to be contained by the environment it interacts with. It also assumes the environment is computable.[6]

Computational aspects

Like Solomonoff induction, AIXI is incomputable. However, there are computable approximations of it. One such approximation is AIXItl, which performs at least as well as the provably best time t and space l limited agent.[2] Another approximation to AIXI with a restricted environment class is MC-AIXI (FAC-CTW) (which stands for Monte Carlo AIXI FAC-Context-Tree Weighting), which has had some success playing simple games such as partially observable Pac-Man.[3][7]

See also

References

  1. Marcus Hutter (2000). A Theory of Universal Artificial Intelligence based on Algorithmic Complexity. Bibcode2000cs........4001H. https://archive.org/details/arxiv-cs0004001. 
  2. 2.0 2.1 2.2 (2005). Universal Artificial Intelligence: Sequential Decisions Based on Algorithmic Probability. Texts in Theoretical Computer Science an EATCS Series. Springer. doi:10.1007/b138233. ISBN 978-3-540-22139-5. https://books.google.com/books?id=NP53iZGt4KUC. 
  3. 3.0 3.1 3.2 Veness, Joel; Kee Siong Ng; Hutter, Marcus; Uther, William; Silver, David (2009). "A Monte Carlo AIXI Approximation". arXiv:0909.0801 [cs.AI].
  4. Universal Artificial Intelligence
  5. Leike, Jan; Hutter, Marcus (2015). "Bad Universal Priors and Notions of Optimality". Proceedings of the 28th Conference on Learning Theory. http://proceedings.mlr.press/v40/Leike15.pdf. 
  6. Soares, Nate. "Formalizing Two Problems of Realistic World-Models". https://intelligence.org/files/RealisticWorldModels.pdf. 
  7. Playing Pacman using AIXI Approximation – YouTube
  • "Universal Algorithmic Intelligence: A mathematical top->down approach", Marcus Hutter, arXiv:cs/0701125; also in Artificial General Intelligence, eds. B. Goertzel and C. Pennachin, Springer, 2007, ISBN:9783540237334, pp. 227–290, doi:10.1007/978-3-540-68677-4_8.