TL;DR - theoretically.
(But easier said than done.)
Gamebooks are typically made to be played again after reaching an ending. This is true for choose-your-own-adventure books with mutiple paths and endings; for solo RPGs where the player character might die in combat; or adventures such as Fighting Fantasy which include both combat and branching plots.
But how many times can a game be replayed?
For games with branching paths and endings, a game can theoretically be replayed until all possible paths have been explored (or until the reader found the One Good Ending™ and has no further reason to play, or until the reader has reached enough endings to get bored and just flip through the book).
But even when replaying, the reader will probably just return to one of the forks along the path, and not re-read thrle whole thing each time they go through it.
In games where replayability comes from character death, on the other hand, the replayability isn't done for the sake of playing the game again, but just as another attempt to get past the unfinished challenge.
This isn't necessarily a bad thing; the real possibility of losing makes the eventual victory so much more rewarding.
Games focused on puzzles, such as my own Zaltec games, have very little replayability (beyond the aforementioned death-induced retry), as puzzles can typically be solved just once.
(Unless a puzzle can have several possible correct answers, which is a really cool idea I'd like to tackle some day.)
Bottom line?
Gamebooks can be played a few times, and that's it.
So how can a game be made to allow infinite replayability?
Here are some ideas:
0. Computer-generated storylines and characters
That's basically a computer game or Interactive Fiction, not a classical gamebook.
Let's move on.
1. Random-tables for generating storylines and characters
Better.
A gamebook can include tables for rolling dice and adding elements to the story based on the results.
These random tables can be used to generate landscapes, combat encounters, non-player characters, goals and missions, dungeons, environments, and more.
While such random-generation might not be truly infinite, they can be combined to create nearly-infinite possibilities.
This kind of system has its downsides, of course:
- Downside the First:
It's difficult to randomly-generate high-quality narrative beyond elements within the story.
- Downside the Second:
Although each playthrough is technically different, it can still often feel the same to the readers; and we're discussing replayability value, not just "how many times can the game be altered."
- Downside the Third:
Such randomization makes the gamebook become more similar to a board game than a story (which might not be a bad thing if that's what the players are looking for).
Readers often turn to gamebooks for the sake of immersion and exploration.
These problems can be worked around, but it isn't easy.
And, of course, you can't randomize puzzles.
OR CAN YOU?
I plan to write a dedicated blog post just for that.
Spoiler: Consider the game of chess.
...and speaking of chess, here's the final idea:
2. Some kind of system where the elements of the story are not pre-written
Not in different branches, and not in random-tables.
Consider, as I mentioned, the game of chess.
- The game has consistent rules that don't require infinite writing, and yet -
- The rules allow the game to develop in practicially inifinite different ways (OK, not mathematically infinite, but still more possibilities than there are atoms in the universe (and there are a darn lot of atoms in the universe)).
Could a game system be written that allows the story to develop differently every time, like in chess?
Could such a system enable creating different characters, places, motivations, and backstories each time?
How could such a system be run by a single player, without a game master (like in TTRPGs) or a computer program (like in computer programs)?
I don't know.
But I hope to find out some day.