  A k-ary semi-algebraic relation E on R^d is a subset of R^{kd}, the set of
k-tuples of points in R^d, which is determined by a finite number of polynomial
equations and inequalities in kd real variables. The description complexity of
such a relation is at most t if the number of polynomials and their degrees are
all bounded by t. A subset A of R^d is called homogeneous if all or none of the
k-tuples from A satisfy E. A large number of geometric Ramsey-type problems and
results can be formulated as questions about finding large homogeneous subsets
of sets in R^d equipped with semi-algebraic relations.
  In this paper we study Ramsey numbers for k-ary semi-algebraic relations of
bounded complexity and give matching upper and lower bounds, showing that they
grow as a tower of height k-1. This improves on a direct application of
Ramsey's theorem by one exponential and extends a result of Alon, Pach,
Pinchasi, Radoi\v{c}i\'c, and Sharir, who proved this for k=2. We apply our
results to obtain new estimates for some geometric Ramsey-type problems
relating to order types and one-sided sets of hyperplanes. We also study the
off-diagonal case, achieving some partial results.
