Sorting n-dimensional vectors

Friends, help me solve the problem. I cannot find a solution to this problem. I want to classify n dimensional vectors. Each vector is an object. When a new object appears, it is assigned a 128-dimensional identifier (vector). This vector finds a similar vector in its neighborhood. Next, the object tells how much it suits (likes) this nearest vector (another object). If the object fits, then you need to change the original vector to bring these objects closer together. If the object does not fit, then you need to move these vectors apart so that next time this object is selected with the least probability.

Here is a real life example. You slip your hand into the bag and choose a fruit. If you likes the fruit, then you put it close with your hand, if you don’t like it, then you move it aside so that you don’t take it next time. And this is how you sort the whole bag.

I cannot figure out how to implement this using a neural network. Help me.