SimonLucas / ntbea

N-Tuple Bandit Evolutionary Algorithm
13 stars 2 forks source link

Simplify the BanditLandscapeModel #5

Open SapphireBrand opened 5 years ago

SapphireBrand commented 5 years ago

The BanditLandscapeModel has a required ArrayList of the sampled points, and an optional member of the tuples data structure for the n-tuple.

Instead, it is better to have no ArrayList for the sampled points, and require that n-tuples are used in the model. There are two advantages.

First is a reduction in memory for the normal case where n-tuples are desired. Basically, the algorithm must keep a record of the samples points, so we might as well keep statistics for them.

Second advantage is the ArrayList of samples points has a lot of duplicate members, whereas the tuples data structure keeps a map indexed by IntArrayPattern. So the tuples data structure has no duplicates.

SimonLucas commented 5 years ago

Thanks - I'm just answering this from memory, but it may be useful sometimes to record the order in which points are added which the ArrayList does. But it does seem unnecessary.

On Sun, Feb 3, 2019 at 8:02 PM SapphireBrand notifications@github.com wrote:

The BanditLandscapeModel has a required ArrayList of the sampled points, and an optional member of the tuples data structure for the n-tuple.

Instead, it is better to have no ArrayList for the sampled points, and require that n-tuples are used in the model. There are two advantages.

First is a reduction in memory for the normal case where n-tuples are desired. Basically, the algorithm must keep a record of the samples points, so we might as well keep statistics for them.

Second advantage is the ArrayList of samples points has a lot of duplicate members, whereas the tuples data structure keeps a map indexed by IntArrayPattern. So the tuples data structure has no duplicates.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/SimonLucas/ntbea/issues/5, or mute the thread https://github.com/notifications/unsubscribe-auth/ACoZ4UcB-f_95LBSm2Q7oNlydJ2YTMJ-ks5vJ0A8gaJpZM4agSNz .

-- Professor Simon Lucas Head of School Electronic Engineering and Computer Science Queen Mary University of London