Change ===== separator
https://github.com/algorithmicsuperintelligence/openevolve/blob/a631841c71838bd580784c0390efbddcbb9e845d/openevolve/prompt/templates.py#L45-L57
Can we change this ======?
This is frequently used in code comments, especially those generated by claude / codex. I think this is collision is causing some weird behaviour.
The easy way around this is to use the full rewrite mode, but from my experience the SEARCH/REPLACE mode works better for certain LLM models.
The pattern you mentioned is defined as a regex in the extract_diffs function (openevolve/utils/code_utils.py, line 73) in the variable diff_pattern. This could be easily changed to be a variable whose default value is r"<<<<<<< SEARCH\n(.?)=======\n(.?)>>>>>>> REPLACE", and then you could for instance define this diff pattern in a config file. You can make this change to your local fork, but I can also make a PR with it if more people think it makes sense.