This paper introduces a form of boundedly-rational expectations into an otherwise standard New-Keynesian Phillips curve. The representative agent's forecast rule is optimal (in the sense of minimizing mean squared forecast errors), conditional on a perceived law of motion for inflation and observed moments of the inflation time series. The perceived law of motion allows for both temporary and permanent shocks to inflation, the latter intended to capture the possibility of evolving shifts in the central bank's inflation target. In this case, the agent's optimal forecast rule defined by the Kalman filter coincides with adaptive expectations, as shown originally by Muth (1960). I show that the perceived optimal value of the gain parameter assigned to the last observed inflation rate is given by the fixed point of a nonlinear map that relates the gain parameter to the autocorrelation of inflation changes. The model allows for either a constant gain or variable gain, depending on the length of the sample period used by the agent to compute the autocorrelation of inflation changes. In the variable-gain setup, the equilibrium law of motion for inflation is nonlinear and can generate time-varying inflation dynamics similar to those observed in long-run U.S. data. The model's inflation dynamics are driven solely by white-noise fundamental shocks propagated via the expectations feedback mechanism; all monetary policy-dependent parameters are held constant.