Let G be an affine algebraic group acting on an affine variety X. We present an algorithm for computing generators of the invariant ring K[X] in the case where G is reductive. Furthermore, we address the case where G is connected and unipotent, so the invariant ring need not be finitely generated. For this case, we develop an algorithm which computes K[X] in terms of a so-called colon-operation...