Okay you can improve your engine for 2017 but what happens
if you get it wrong...are you stuck with a crappy engine for 2018
like before
No I'm pretty sure the gloves are off and the engines can be developed anyway they choose going forward in 18 as well as this year.
They can still only use 4 engines per car in a season before getting penalties though, so they will introduce changes/upgrades at strategic intervals - unless their engine is really pants of course.
The change engine doesn't have to be an upgrade of the previous unit it can be completely new, well very different anyway, to the one it replaces. There are no tokens so no restrictions on what can be done, as long as it's inside the parameters of the published engine regs - i.e. 1.6 turbo internal combustion, etc, etc.