latitudegames / AIDungeon

Infinite adventures await!
http://www.aidungeon.io/
MIT License
3.19k stars 554 forks source link

[BUG] After about 8-10 commands, game stops running. #138

Open Vortexx1988 opened 4 years ago

Vortexx1988 commented 4 years ago

Describe the bug Every time I play the game, no matter what type of story I choose, after about 8-10 commands, the game stops responding.

To Reproduce Play the game and type about 8-10 responses.

Expected behavior Should be able to continue indefinitely, or at least until the end of the story.

Additional context I've tried in both Google Chrome and Firefox, with the same results.

kik4444 commented 4 years ago

Are your responses long?

robotimer commented 4 years ago

I'm seeing this happen mostly when using dialogue. Something like typing: "Where are we?" instead of: ask where we are

I'm gonna try playing without ANY dialogue in quotes and see if that helps.

kik4444 commented 4 years ago

I'm seeing this happen mostly when using dialogue. Something like typing: "Where are we?" instead of: ask where we are

I'm gonna try playing without ANY dialogue in quotes and see if that helps.

Try not to use direct speech very often and if you have to, then save right before it

AlSovPich commented 4 years ago

I tried to play without direct speech, but after ten requests game just stopped. It just writes nothing. Maybe it is because of 'ask'. And if I start new game on same list (without reloading, just with 'restart'), I can play for ten phrases more.

AlSovPich commented 4 years ago

I tried again without 'ask'. All works normally.

louisgv commented 4 years ago

Seems like this is resolved. Please close @AlSovPich

Vortexx1988 commented 4 years ago

I've tried playing without typing dialogue in quotation marks, I've tried without using 'ask', and the same thing seems to happen, sometimes now with a lengthy error message.

AlSovPich commented 4 years ago

Seems like this is resolved. Please close Vortexx opened this issue, not me

AlSovPich commented 4 years ago

And it still crash after using direct speech

Teravus commented 4 years ago

The only way that I have found to resolve this is to reduce the size of the context being passed to the model. This has a side-effect of the model forgetting things. There's an internal history limit of 20 story items. To keep it relatively infinite, I'd suggest keeping the whole context at a maximum of 4000 characters. I used this to keep the model alive for many hours on Twitch.

Sporking commented 4 years ago

This could be a code correctness problem (buffer overflow or improper bounds checking), not an out-of-memory problem. See bug #251.

Sporking commented 4 years ago

If quotes or apostrophes seem to be related to the problem, please see my comments near the end of bug #55 .