I've been struggling trying to edit Eliza chatbot in Prolog. every time I try to edit something, a new error show up. Is it protected to any sort of editing? 

I edited using SWI-prolog editor. The problem is that I'm trying to minimize the code without fully understanding it. I'm trying to do a simple short version of it. So, I might removed something essential perhaps! like "my\_char\_type" for example. The error I got is " retract/1: No permission to modify static procedure `rules/1'" 

Is there any code for a smaller chatbot that I can understand?

Please help :'(