State generator