  Let $G$ be a group. Let $X$ be a connected algebraic group over an
algebraically closed field $K$. Denote by $A=X(K)$ the set of $K$-points of
$X$. We study a class of endomorphisms of pro-algebraic groups, namely
algebraic group cellular automata over $(G,X,K)$. They are cellular automata
$\tau \colon A^G \to A^G$ whose local defining map is induced by a homomorphism
of algebraic groups $X^M \to X$ where $M\subset G$ is a finite memory set of
$\tau$. Our first result is that when $G$ is sofic, such an algebraic group
cellular automaton $\tau$ is invertible whenever it is injective and
$\text{char}(K)=0$. As an application, we prove that if $G$ is sofic and the
group $X$ is commutative then the group ring $R[G]$, where $R=\text{End}(X)$ is
the endomorphism ring of $X$, is stably finite. When $G$ is amenable, we show
that an algebraic group cellular automaton $\tau$ is surjective if and only if
it satisfies a weak form of pre-injectivity called $(\bullet)$-pre-injectivity.
This yields an analogue of the classical Moore-Myhill Garden of Eden theorem.
We also introduce the near ring $R(K,G)$ which is $K[X_g: g \in G]$ as an
additive group but the multiplication is induced by the group law of $G$. The
near ring $R(K,G)$ contains naturally the group ring $K[G]$ and we extend
Kaplansky's conjectures to this new setting. Among other results, we prove that
when $G$ is an orderable group, then all one-sided invertible elements of
$R(K,G)$ are trivial, i.e., of the form $aX_g+b$ for some $g\in G$, $a\in K^*$,
$b\in K$. This allows us to show that when $G$ is locally residually finite and
orderable (e.g. $\mathbb{Z}^d$ or a free group), and $\text{char}(K)=0$, all
injective algebraic cellular automata $\tau \colon \mathbb{C}^G \to
\mathbb{C}^G$ are of the form $\tau(x)(h)= a x(g^{-1}h) +b$ for all $x\in
\mathbb{C}^G, h \in G$ for some $g\in G$, $a\in \mathbb{C}^*$, $b\in
\mathbb{C}$.
