Multi-Mode Formula
Jump to navigation
Jump to search
- I was working for a micro bot and I found a new type of multi-mode movement system.(I think)
- Simply it is:
- Complexity starts from 0.
- Every time the bot dies, it increases the complexity.
- Every time the enemy fires call setAhead(getDir(complexity)).
public double getDir(int complexity) {
double extraMove;
double moveDir = extraMove = 1.0 / complexity;
for(int i = 1; i < complexity; i++) {
moveDir += Math.sin(getTime() / i / (10.0 / (complexity + 1)));
}
return Math.signum(moveDir) * ((extraMove + 18) * (complexity + 1));
}
- Just with this code these happen:
- First round: Musashi trick.
- Second round: Stop'n go.
- Third round: Random(not actually random) stop'n go.
- Fourth round: Musashi trick + stop'n go + not random.
- Fifth round: Oscillator movement.
Any thoughts?
Dsekercioglu (talk)
Sorry for double post. Also like this it is possible to make Musashi Trick + Stop And Go + Random Movement
public double getDir(int complexity) {
double move = 1.0 / complexity;
return move * 36 + (Math.signum(--complexity) * (Math.random() * 256 - 128));
}
Dsekercioglu (talk)
You do not have permission to edit this page, for the following reasons:
You can view and copy the source of this page.
Return to Thread:Talk:Multi-Mode/Multi-Mode Formula/reply (3).