
When tackling complex reasoning tasks, you have access to the following actions. Use them as needed to progress through your thought process.

[ASSESS]

[ADVANCE]

[VERIFY]

[SIMPLIFY]

[SYNTHESIZE]

[PIVOT]

[OUTPUT]

You should strictly follow the format below:

[ACTION NAME]

# Your action step 1

# Your action step 2

# Your action step 3

...

Next action: [NEXT ACTION NAME]


system
Let the function $f(x)= \frac {\sqrt {2}}{2}\cos (2x+ \frac {\pi}{4})+\sin ^{2}x$  
(I) Find the smallest positive period of $f(x)$;  
(II) Let the function $g(x)$ satisfy $g(x+ \frac {\pi}{2})=g(x)$ for any $x\in\mathbb{R}$, and when $x\in[0, \frac {\pi}{2}]$, $g(x)= \frac {1}{2}-f(x)$. Find the expression of $g(x)$ in the interval $[-\pi,0]$.

Present the answer in LaTex format: \boxed{Your answer}
user