I studied software development and english literature, and 'natural language generation' of poetry and fiction is one of my interests.
In history, there have been a lot of explicit procedural literary techniques dating back to movements like dadaism, surrealism, the Beats, OuLiPo, and various others. Of course, there was and is also work going on using computers.
There is a lot of scattered work and narrow projects in the area. Which I guess sums up the problem: brittleness. In other words, it is easy to create a system which completes a particular writing task (like writing sports articles, or using a fairly rigid methodology to write poems or fictional works), but as soon as you try to generalise beyond the original task, you find that it cannot scale up.
A lot of current writing algorithms/AI is based on things like templates, and probabilistic models trained on fairly clear relationships between data and text (sports/finance/etc). You can train a system to understand a relationship which is as straightforward as sports teams winning or losing, sports players scoring points, and changes in stock prices and so on.
However!
The issue with teaching computers to write books is that it is a much more complex task. Training a system to write what books communicate (worlds, characters, places, plots, themes, references, human relationships, the human condition, etc) requires that you model them explicitly in data structures (or implicitly as some kind of probablistic model trained on other texts - but then the problem is that the system needs to be able to read and model the right kinds of features from those training texts to reproduce something similar).
In other words (or at least, this is my argument), to be able to teach a computer to write books, it probably needs to be able to read them first - at least approximately enough that the newly generated texts make sense and carry a lot of the expected features of books. Perhaps this is possible in a very 'formalist' way (looking for literary structures, forms, inherent features: chapters, characters, places, relationships, plots, ...). But I think it would remain difficult to 'scale up' even with the greatest of efforts.