I have some domain knowledge I want to use in a regression problem. 

**Problem statement**

The dependent variable $y$ is continuous.  

The independent variables are $x\_1$ and $x\_2$. 

* Variable $x\_1$ is continuous and positive.
* Variable $x\_2$ is categorical, ordered, and takes only few different values (i.e, less than 10).

I want to fit a **regression function $f$** so that $y = f(x\_1,x\_2)$, with the constraints 

1. $f(x\_1,x\_2)$ is monotonically increasing in $x\_1$
2. $f(x\_1,x\_2)$ is bounded in $[0,1]$
3. $f(x\_1,x\_2)$ is "smooth" in $x\_2$

These constraints come from domain knowledge of the problem.

Samples are evenly distributed among $x\_2$ but not $x\_1$.

**My question: which techniques do you recommend for such regression problem?**

---

I'm currently ignoring the last two constraints, and using the [monreg package](https://cran.r-project.org/web/packages/monreg/monreg.pdf). (I run one regression for each possible value of $x\_2$)

I can not give a formal definition of "smooth" in this context. I can assume that $f(x\_1,x\_2)$ does not change much along $x\_2$ values that are consecutive.

I have found some SO questions regarding this issue but it looks like they have not raised much attention, or are very focused on specific R packages. [Q1](https://stats.stackexchange.com/questions/67789/kernel-regression-with-monotonicity-constraints) [Q2](https://stats.stackexchange.com/questions/197509/how-to-smooth-data-and-force-monotonicity)

Problem context: This regression will be used as a [function approximation of (a component) the value function in a reinforcement learning algorithm](http://webber.physik.uni-freiburg.de/~hon/vorlss02/Literatur/sutton/8/node1.html). Because of that the constraints have to be enforced by the regression model, and can not be hand controlled. Moreover, the regression will be run several times with increased number of samples.