Preface. I recommend reading this.
Hi everyone.
I’ve done a huge amount of work, but I’m still only at the beginning of my path.
This is the first neural network working directly inside Virt-A-Mate itself. And I am rightfully one of the first who did this in VAM.
This is a prototype, so treat it not as a final product, but as the beginning of something bigger. I started this project a long time ago. But I abandoned it because I didn’t have enough experience, knowledge, or scripts. And now, for the past couple of weeks, I’ve come back to it after half a year.
I want to express my gratitude to @MeshedVR for the VAM game. For me, it’s a huge sandbox where I can sharpen my skills. I don’t know of any equivalent. Maybe only Unity or Unreal. But that’s another story and not about VAM.
I also want to express my gratitude to @CheesyFX. My path in VAM started with your scripts and your automation. For me, you remain an example and an authority in the best automation on VAMHUB.
I also want to thank @Skynet for Dynamic Limbs. I used your plugin and quickly reworked it for myself. I could have written everything from scratch, but your plugin saved me time. Thank you.
I will need to write a separate article on the forum in the plugins section about working with neural networks and this plugin, but I’ll do that later. I’m very busy right now developing this small neural network so I can later transfer everything I’ve built into a bigger desktop neural network. So for now I don’t have enough time to write a full article to share my experience with you.
Also keep in mind that this is not a text neural network, this is RL. It’s a very temperamental bitch, like any RL. It needs a special approach to train it correctly. It’s not only the code inside the script that gives it rewards for correct actions or penalties, for example if it correctly inserted the penis into the right hole at the right angle, or started thrusting along the penis, or brought its hips in, but also the actions that you perform with it. The neural network likes to cheat and find places where it gets more reward, and it will not always follow the expected result, so I’m in the process of taming this bitch. In this neural network, I still haven’t implemented a lot yet. I still need to add many rules, and before that test each one of them, so the neural network does what it is supposed to do. But the final result will also depend on you as players. If you do things wrong, all you will get is frustration and disappointment.
Now about my neural network
This is a small SAC neural network with elements of dream prediction. I’m sharpening my skills on it. I also have a server on a real dreamV3 network with action prediction, which runs on my desktop PC as well. It is much stronger and smarter, but it is in development. If anyone is interested and understands this stuff, I’ll gladly share the code and post it on GitHub.
I have no goal of getting donations from this. If you want to thank me, of course, I can add a link to my crypto account on my script page, but that is not the main thing for me. I’m just interested in doing this, it’s my hobby. @MeshedVR gave me the opportunity to become part of VAM and share my work with you, make VAM better, and attract new people.
My neural network is a prototype. It can be used for anything, whether that’s training dances or reacting to music. I left 20 empty channels, but you can increase that number yourselves or add new neuron layers, though that will lead to extra load on the PC during training. In the future, I was thinking of making it so that you could write scripts yourselves for whatever you need to train it for, for example through ChatGPT, connect them to this neural network, and train it for your tasks: dancing, moving to the beat of music, fucking, or being your companion, and replace the Sex button with a general Start button. But maybe I’ll end up implementing that already in my big neural network.
How my neural network works in VAM
VAM1 itself uses old technology, and it is very unstable compared to VAM2. I’ve tested both versions. In VAM1 there can be crashes, the game can crash. Unfortunately, that’s just how it works. I tried to make protection against this in my script, and I constantly have to balance in VAM1 between the load on it during neural network training, the game breaking, and crashes. This takes a lot of time. And there is no full guarantee that at the moment of loading weights or saving, you won’t hit an error and a game crash.
One more thing. I know that neural networks can be trained on Google servers or that you can create the needed environment in Unity and train there many times faster, but I don’t know how to do that and I don’t have time for it while I’m writing and tuning the neural network, so I can only train it the same way you can, inside the game itself and in real time.
I still have a lot to do, to describe the rules and rewards for correct movement along the penis and so on. I also want to make separate behavior profile buttons, where the neural network will orient itself in how to move, for example with the hips in sex mode: fast, medium, slow, the way you would want it, or different profiles like in my Sex-Machine script for different styles of behavior.
Now I think it’s worth moving on to an overview of how the plugin works. For now it will be small and not fully complete. But it will give you an idea of what is what.
0
I didn’t have time to sit and train it for a long time. I’m in the process of modernizing this neural net, and because of that I don’t know what the result after long training will be. On top of that, some changes and modernization lead to the old weights no longer being loadable, and you have to start everything all over again. So try it and send your results and videos to me in the Discussions tab. I really will be interested to see what you got.
Important
Do not use Save Full. This function saves not only the weights, but also all the memory accumulated in the game. The memory here is needed for better learning in the moment. This is a test function. Most likely, if the file becomes large, around 20–30 megabytes, after a couple of saves or those kinds of loads you will get a guaranteed game crash.
1
Lock the body in the position you need before starting training. Leave only the hip, pelvis, and stomach controllers free so they don’t interfere with it moving. Let it first smell the dick, learn to correctly put the right hole onto it, and only then free the other controllers as training progresses. Don’t expect it to learn quickly in 5 minutes. It takes time. The minimum needed just to see anything at all is half an hour to an hour. Just be patient.
2
When the pose is locked, turn on one of the scripts, either mine from Sex-Machine, FuckingReach, or BodyLanguage, or timeLine recordings. Turn on training mode or auto-training mode, show it how it should move, and keep it in that mode for no less than 30–60 minutes. Watch that the pose doesn’t drift and put everything back if it does, otherwise you will train it wrong.
Also don’t forget that if you teach it new poses, you need to mix the old ones in too. Otherwise it will forget them. Unfortunately, this is a problem with all RL neural networks, so real training uses large datasets. But that’s not what we’re here for. We just want to play and see what comes out of it.
Instruction
General layout
This build is divided into 6 working plugins.
UniversalFullBodyBrain is the main brain. It collects observations, calculates actions, applies RL and coach logic, calculates reward, trains the network, manages snapshots, body memory, and arousal. It is exactly the thing that ties together physics, perception, hole geometry, DynamicLimbs, and the behavior layer.
AIPhysicsController is the movement executor. It keeps the list of controlled controllers, takes force and torque commands, turns drives on and off, watches anti-snap, and handles a temporary hip-cycle during a sharp pose change.
AdvancedAIPerceptionSystem is the sensory system. It collects physical data from the body, controller speeds and rotations, penis data, proximity and penetration for holes, and builds a state from all of that for the brain.
A_Triggers.cs / OrificeTriggerManager is the geometry and trigger system for the holes. It is responsible for the vagina, anus, mouth, proximity, depth, synthetic mouth, and serves as the source of “geometric truth” for the AI.
DynamicLimbs is an auxiliary body system. It does raycast and vision, hand colliders, wrap and grasp finger morphs, and a number of auxiliary body sensors and visualizations.
AIBehaviorSystem is a light layer of style and local behavior. This is not the main RL brain, but rather an auxiliary interface for style and intensity, and a universal input point for behavior commands.
1) UniversalFullBodyBrain — the main brain
What it is for
This is the main plugin of the system.
It takes data from AIPhysicsController, AIPerceptionSystem, DynamicLimbs, OrificeTriggerManager, and AIBehaviorSystem.
It builds the observation.
It calculates the action.
It mixes RL and coach logic.
It calculates reward.
It writes transitions into the replay buffer.
It trains the actor, critic, and dream model.
It can save and load weights and full snapshots.
Main buttons and toggles
Sex
This is the main launch of combat mode. While it is turned off, the brain does not work as a full sex and reward loop, and forces are reset.
Train
This turns on network training: normalization, writing transitions into the buffer, and training steps. This is the “learn” mode.
Self-Training
This also turns on training, but in meaning this is a mode where the agent should already actively move on its own and learn from its own behavior. In practice, this is a more autonomous RL mode.
Help
This turns on the coach. The coach does not replace RL, but pushes the body toward useful geometry and a more stable configuration. In your file, the rule is written right at the beginning: coach — guide, not policy.
Auto-Coach
This makes the coach strength adaptive. It does not hold it at one number, but changes it depending on the state of the scene.
Auto Sliders
This allows the brain to adjust part of the key sliders by itself, including exploration, residual scale, dream mix, and some RL parameters.
Arousal Auto
An automatic arousal system: growth, drop, end timer, and trigger actions for peak, end, and pump.
Freedom
A mode of freer autonomous movement. It is logically separated from regular training.
Auto-Capture Example
If the example memory is empty, the brain can capture a starting body example by itself. This is convenient for an initial start without manual capture.
Main brain sliders
RL and training block
Exploration is exploration noise. The higher it is, the more random movement there is on top of the network action.
LR Actor is the policy learning rate.
LR Critic is the critic learning rate.
SAC entropy alpha is how much policy stochasticity is encouraged.
SAC target tau is the softness of updating the target networks.
Dream mix is how much influence is given to the dream and world model part.
LR Dream-Model is the dream model learning rate.
RL operations per tick is how many training operations to do in one cycle.
RL budget (ms/tick) is the time limit for training per tick.
RAM buffer is the replay buffer size.
Coach block
Help Strength is the base coach strength in manual mode.
Auto-Coach Min is the lower bound of auto-coach.
Auto-Coach Max is the upper bound of auto-coach.
Auto-Coach Speed is how fast auto-coach readjusts itself.
Body Memory Influence is how strongly to use the memory of the body example.
Shape Retention Strength is how strongly to hold a useful body form.
Support Search is how actively to search for stable body support.
Movement block
RL Strength is how strong the network’s own contribution will be.
Max Force is the overall ceiling for command force.
Torque Limit is a separate restraining coefficient for torque.
Thrust Speed is how aggressively to thrust by speed.
Thrust Depth is how aggressively to reach depth.
Thrust Window (cm) is the window inside which thrust logic is considered useful and active.
Reward and targets block
Reward Scale
Gamma
Hole is the target selection: auto, vagina, anus, mouth.
Arousal block
Arousal %
Arousal Growth
Arousal Drop
End Time (sec)
Plus 3 trigger action buttons: Start, End, and Pump Trigger Arousal.
Snapshots and memory
Save Weights and Load Weights
Save Full and Load Full
Reset RL
Capture Body Example
Clear Body Examples
Auto Save Weights and Auto Save (min)
Status fields: RL Status, Skill Status, Reward Status, Memory Status, Force Log, Snapshot Status, Snapshot Check.
How to use it in practice
For a beginner in a scene, turn on Sex. Turn on either Train or Self-TrainingHelp. Optionally turn on Auto-Coach. If you want a start from an already good form, use Capture Body Example. If you want the start to be “from zero,” clear the examples.
2) AIPhysicsController — the movement executor
What it is for
This plugin does not think, it moves. It takes force and torque commands from the brain and applies them to the body controllers. It also controls the activation of separate drives, force reset, anti-snap, and a temporary hip-cycle during a pose change.
The main things in the UI
Enable Physics Movement
This is the main switch for physical movement. If it is turned off, force and torque commands are not applied, and controller states are returned to default.
Physics Status
Shows which forces and torques are actually active right now.
Pose Reset Status
Shows anti-snap: whether there were triggers, how many, why, and whether suppress is active right now.
Max force ctrls/tick
How many controllers to service at most in one physics tick. This is a balance between responsiveness and stability or load.
Follow Server Pose and Server Pose
Pose preset logic, if you want physics to take the selected pose or mode into account.
Controller checkboxes
These turn the drive on and off for each controller separately. The order from top to bottom is hip first, then arms, feet, knees, elbows, then the rest. In the code there is also a table of true and false defaults for what is enabled by default when the plugin starts.
In practice
If UniversalFullBodyBrain is the “brain,” then AIPhysicsController is the “muscles and joints.”
When you turn off individual checkboxes, you tell the brain, “don’t control this right now.” When you turn them on, you say, “this node can be used again.”
3) AdvancedAIPerceptionSystem — perception
What it is for
It builds a physical observation of the body and the scene.
It tracks controller speeds and rotations.
It tracks penis position and curvature.
It tracks proximity and penetration for holes.
It tracks the currently observed hole.
It builds the body state to pass into the AI.
UI
Everything here is simpler.
Advanced Physics Sensing
Turns the perception system on and off.
Perception Status
Shows the status, what it found, what it is reading, and whether it is updating.
Perception JSON Snapshot
A hidden bridge payload for internal data transfer.
When to think about it
Usually this plugin is almost never adjusted manually. It should be turned on and just work in the background. If the brain is “blind,” then this is exactly where you look.
4) A_Triggers / OrificeTriggerManager — holes and geometry
What it is for
This is the geometric plugin of the scene. It is responsible for the mouth, vagina, and anus, for proximity, inside, depth, entry distance, axis alignment, and lateral error, for the synthetic mouth, for penis visualization, and for debug channel and collider display for mouth, vagina, and anus.
What is important to understand here
This plugin is the source of truth about the target.
The brain does not “guess” on its own where the mouth or vagina is. It gets the geometry from here. So if you need correct reward logic for entry, depth, and alignment, this plugin is exactly the one that must be alive and configured.
What UI elements are usually here
From the code it is clear that this includes hole selection and status, proximity status, debug visualization for synthetic mouth, vagina, and anus, penis visualization, and AI integration status.
5) DynamicLimbs — hands, wrapping, vision rays, body sensors
What it is for
This is an auxiliary “body” plugin.
It creates hand colliders.
It can do wrap and grasp through finger morphs.
It provides raycasts.
It provides vision rays.
It stores different auxiliary body settings.
Main settings groups
From the code, it has raycast distance and raycast visualization, auto wrap and wrap threshold or speed, hand collider size, offset, and rotation, smoothing, debug mode, morph and grasp limits, and vision rays: enable, FOV, distance, count, and show rays.
How to understand this plugin
This is not the main sex RL, but a set of auxiliary body sensors and contact tools.
If you are training grip, hand support, local contact, and body orientation, it is useful. If the task is pure thrust and entry, it is secondary, but it still gives the body more body context.
6) AIBehaviorSystem — style and local behavior
What it is for
This is a light layer on top of physics.
Behavior Status
Enable Physics Behavior
Action Smoothing
Selected Style
Action Intensity
And it also has a universal method for handling action commands if you want to keep behavior style and intensity on top of RL.
What the elements mean
Enable Physics Behavior
Turns this layer on and off.
Action Smoothing
How much to smooth the behavior.
Selected Style
A preset style: gentle, balanced, rhythmic, vigorous, passionate, forceful.
Action Intensity
The overall intensity of the behavior.
When to use it
If you want a rough human lever on top of RL like “softer, harder, more rhythmic,” use this.
If the goal is purely low-level RL training without style overlays, you can almost leave it alone.
Practice: how to tune the important sliders manually
Below are my recommendations, not a hard law. This is not “how it is written in the code,” but how it is more convenient for people to use it.
Stage 1. Zero or almost zero weights
The goal of this stage
Not to make “beautiful sex,” but to get the agent to start moving meaningfully at all, without falling apart, and to find useful areas of space.
What I would do
I would keep Exploration noticeable. Not maxed out, but not low either. In practice: 0.12–0.22.
I would keep Help Strength below the maximum. In practice: 0.30–0.50.
Auto-Coach can be turned on, but with a narrow corridor. In practice, Auto-Coach Min: 0.15–0.25, Auto-Coach Max: 0.45–0.60.
I would keep RL Strength moderate. In practice: 0.25–0.40.
I would not inflate Max Force too early.
I would keep Torque Limit conservative.
I would keep Thrust Speed and Thrust Depth closer to neutral or a little lower for now.
Why
At this stage the agent needs to try a lot, not be too constrained, but also not fly off into a meat grinder.
That is why exploration is moderately high, the coach is moderate, and RL is not choked off yet, but also not released into pure chaos.
Stage 2. The first meaningful movements have appeared
The goal of this stage
To stop twitching meaninglessly and start repeating useful patterns.
What I would do
I would start lowering Exploration. In practice: 0.07–0.14.
I would also lower Help Strength. In practice: 0.18–0.35.
I would raise RL Strength. In practice: 0.35–0.55.
I would keep Body Memory Influence
I would keep Shape Retention Strength and Support Search moderate, not maxed out.
Why
At this stage, too much coach starts getting in the way, and too much exploration breaks repeatability.
Now you no longer need to “search everything.” You need to lock in what has already started to work.
Stage 3. Stabilization, contact holding, entry, thrust
The goal of this stage
To get more stable geometry, more depth, an in-and-out rhythm, and less slipout.
What I would do
I would keep Exploration low to medium. In practice: 0.03–0.08.
I would keep Help Strength low to medium. In practice: 0.10–0.22.
Auto-Coach can stay on, but not with a crazy max.
Now Thrust Speed and Thrust Depth can already be tuned to the style of the scene.
Thrust Window (cm) should be tuned to the specific task.
RL Strength should already be higher than at the start.
Why
At this stage the agent already needs to refine technique, not live on the coach’s crutches.
The coach should help only as a stabilizer, not as a second pilot.
Stage 4. Polishing / final fine-tuning
The goal of this stage
To remove unnecessary noise and let the network lock in its own behavior style.
What I would do
I would keep Exploration low. In practice: 0.01–0.05.
I would keep Help Strength very moderate. In practice: 0.05–0.15.
I would keep RL Strength high, but without insanity.
I would slightly lower LR Actor and LR Critic
I would not inflate Dream Mix.
I would raise RL Operations per Tick and RL Budget (ms/tick) only if the training pace is really needed and the scene can handle it.
Why
The final stage is not about searching, it is about locking things in.
If you leave high exploration and high coach at the end, the network will never become truly independent.
Separately about the most important controls
Exploration
This is not “intelligence,” but the level of experimental noise.
More means the agent tries more new things, but also creates more garbage.
Less means the agent repeats what it has already understood.
The rule is simple. At the start, higher. In the middle, medium. At the end, low.
Do not keep it permanently high if the agent has already started to understand the scene.
Help Strength
This is the manual coach strength.
The coach is useful when the body is falling apart, the agent cannot get into a useful zone, and there is too much geometric chaos.
The coach is harmful when it starts dominating RL, and when what you see is not help, but aggressive flinging of the controllers.
The rule is simple. At the start, moderate. In the middle, lower. At the end, even lower.
Do not crank the coach to the ceiling as a permanent mode.
Auto-Coach
This is not some separate “magic,” but automatic floating of coach strength between min and max.
A good way to use it is to set a reasonable min so the coach does not disappear completely, set a sane max so it does not turn into a dictator, and not make the adaptation speed hysterical.
A normal starting corridor is min: 0.15–0.25, max: 0.45–0.60, and speed closer to medium values.
RL Strength
This is, roughly speaking, “how much of a voice the network itself gets.”
If it is too low, the agent lives on crutches forever.
If it is too high too early, you get carnage.
The rule is simple. At the start, low to medium. In the middle, medium. At the end, higher.
Max Force and Torque Limit
This is the safety block.
If forces and torques are too high, even a good action will look like a fight, mistakes will become too expensive, and the body will go flying.
If they are too low, the agent will “think,” but physically it will barely be able to push anything through.
The rule is simple. Do not inflate them at the start. Then raise them gradually only if you see that the network lacks real physical leverage.
Thrust Speed and Thrust Depth
This is already more about behavior in sex than about basic geometry.
Thrust Speed is how energetically to work with tempo.
Thrust Depth is how hard to reach for depth.
It is better to tune them not at the very beginning, but when the agent already holds contact, does not fall apart, and does not lose the target every two seconds.
Body Memory Influence
This is useful if you have a good captured example.
If the example is crooked or no longer fits the scene, it is more of a hindrance.
The rule is simple. If there is a good example, you can keep it higher. If you are teaching freer behavior, keep it moderate. If you want maximum independence, lower it.
Short practical presets
Quick start
Help: on
Auto-Coach: on
Exploration: 0.15
Help Strength: 0.35–0.45
RL Strength: 0.30–0.40
When the agent has already started to understand entry and contact
Exploration: 0.06–0.10
Help Strength: 0.15–0.25
RL Strength: 0.40–0.55
When you are already training stability and rhythm
Exploration: 0.03–0.06
Help Strength: 0.08–0.18
RL Strength: 0.50+
The shortest usage logic
If I put it in the most human way possible:
Brain thinks, learns, rewards, and saves.
Physics moves the body.
Perception sees what is happening.
A_Triggers knows where the mouth, vagina, and anus are, and how well you hit them.
DynamicLimbs gives additional body sensors, contact, and vision.
Behavior adds a convenient layer of style and intensity.