First post. Long time player with a huge pause in playtime... I figure I'd post a tiny bit of my own solution for one of the toughest problems newbies face... moving between rooms. A cursory check of the boards did not seem to cover this stumbling block.
pseudocode -
if (!NEXTROOM || x/y === 49 || x/y === 0){
return moveTo(new RoomPosition(25,25,NEXTROOM, {range: 10});
}
I use this before (most) other AI code is run to help move blindly into a room and to avoid that weird door switching thing.
It removes the bot from the exit, where the room scanning and movement gets messed up, or where saved paths no longer line up correctly.
The arbitrary range of 10 accounts for moving into any configuration of walls within a room. There is always an plain or swamp at range 10 (for now).
Once you get to the next room and are clear of the doorway... use your normal movement tricks.