Combining Learning Mapper and old SWMud Mapper + Adding Features

Posted by Petriomelony on Sat 18 May 2024 07:58 PM — 3 posts, 9,150 views.

#0
Hiya,

I'm hoping to find a way to combine the old SWMud Mapper (https://github.com/nickgammon/plugins/blob/master/SWmud%20mapper.xml) with the newest features of the Learning Mapper, and also add some other things (ie: a way to capture npcs/items in the room also and how often they show up).

I tried using the learning mapper by itself, and it's fairly easy to get working - the only problems I'm having with it are long load times for the map database (ie: multiple seconds causing lag), and I think it even got to the point where the database corrupted and erased itself?

I've been using triggers to specify:

1. Room name - always at start, contained in [] brackets

2. Exits line - contains "obvious exit(s?)" and is in cyan

3. My prompt using a regex

The Learning Mapper is struggling with descriptions, as there are lines that show up between 1 and 2 (actual description) and 2 and 3 (room contents). I would love for it to be able to save both.

Looking at the old SWMud mapper, it seems to use an empty line to recognize the end of the description instead. This is obviously a lot faster (presumably) compared to trying to do all the probability calculations for the whole room.

Would appreciate input on whether the best route would be to try to modify the Learning Mapper, customize the old mapper, or just build a new custom solution entirely using elements of both?

Cheers,

petri
Australia Forum Administrator #1
You can get faster and more reliable handling of the database by changing from saving the state file to using a SQLite3 database, which I did in a couple of mappers (not the SWMud one by the looks of it).

I don't think I used SQLite3 in the learning mapper either, to keep things simple.

You can change it, but it isn't trivial.

As for which one to use, you should be able to make a special case in the learning mapper to handle the blank line at the end of the description, but if the SWMud one works there isn't a heap of point in changing.

The learning mapper was really intended to help people in MUDs that didn't have a mapper at all, so that it could do a passable job of mapping. If you already have a mapper that mostly works, I would probably stick with that (except for the SQLite stuff). The mapper Fiendish did for Aaardwolf uses SQLite3 and the source is available, if you want to see how he did it.
USA Global Moderator #2
Quote:
I think it even got to the point where the database corrupted and erased itself?

One of the problems with using the plugin state XML for storage historically is that there's a file size limit and it used to be very small. It was increased in October 2022 (https://github.com/nickgammon/mushclient/pull/75/files), but there hasn't been a "release" of MUSHclient since before that, so you'd have to get the newer exe from https://github.com/nickgammon/mushclient/releases/download/latest_commit/MUSHclient.exe