Radar
Unlike Melee, there are only 2 enemies that you need to get the positions of. This means that it is almost always more effective to turn the radar back than to continue to rotate the radar for a full circle until you scan an enemy. There are several ways of making optimal radars:
- Last-scan based: this style of radar should be effective in all twin-duel settings, although a special case will be needed for when there is only 1 enemy
- Turn the radar back if the radar turned less than PI radians (180 degrees) since scanning the last bot
- Turn the radar back if the last bot was scanned less than 4 'ticks' ago
- Enemy collection priority based:
- Turn the radar in the direction of the enemy that is determined to have the greatest need of being scanned. This is usually the enemy that has gone the longest without being scanned. Be careful to only consider enemies that are still alive, otherwise you may end up scanning empty space! Also be aware that your radar only extends 1200 away from you. This radar has the advantage of being easily ported to Melee.
Additionally, and similar to Melee, it is helpful to scan your target for several consecutive scans prior to firing at them, to let the gun adjust to a good angle. This can be done by switching to a 1v1 style radar if you have a low GunHeat.
Because you have a teammate, for 2v2 situations it may be beneficial for each bot to scan a different enemy using a standard 1v1 radar lock, and send the data back and forth using the messaging system. A problem with this method is that the messages are only received 1 'tick' after having sent them, making the receiving bot acting a tick late, and thus slightly less accurate. Because TwinDuel is codesize restricted, this technique may not be feasible, worth the codesize, or even have any advantage at all due to the 1-off problem.
Choosing a target
There are many ways of deciding which target should be chosen, each with its advantages and disadvantages:
- Both bots attack the leader:
- This strategy is used to good effect by GrauwuarG
- It's main advantage is that once the leader is killed, the other bot loses 30 life. This should either disable it, or at least make it very easy to kill.
- The disadvantage of this method is that the leader starts with 200 energy, so is harder to kill than its teammate. Also, the leader may be in a position that is harder to hit than its teammate (eg. further away), so hardcoding to attack the leader may be a bad idea.
- This method should be coupled with an aggressive movement, so that the leader is easy to hit. The aggressive movement may also expose flaws in the enemy's movement.
- Both bots attack the non-leader:
- This strategy's advantage is that it is easier to kill the other bot due to it only having 100 energy to start, and thus get a 2v1 advantage. This helps because the remaining bot (the leader) will find it difficult to move perpendicular to both of your bots, making it easy for at least one of your bots to hit it.
- The disadvantage is that the non-leader may be further away or moving perpendicular, making it harder to hit, and thus regain energy, than the leader.
- Like attacking the leader, this targeting method should be coupled with an aggressive movement to ensure that the non-leader is killed before they can pick off your bots.
- Each bot attacks the closest enemy:
- This strategy has the advantage of keeping your bots alive as long as possible. It focuses on prolonging your own bots' life, rather than killing the enemy as quickly as possible. By shooting closer enemies you have a better chance of hitting them, and so get the HitBonus? more often. In fact, if you have a hit rate greater than 33%, your energy can actually increase.
- The disadvantage is that each of your bots can focus on a different bot, and one of your bots then gets killed before you kill either of the enemy bots. This would leave you in a 1v2 situation, where you can't move perpendicularly to either enemy bot, making it much easier for them to hit you.
The best method is all dependent on what style of bot you want. Aggressive bots should both focus on a single bot, either the leader or the non-leader. Passive bots should shoot at the closest bot to avoid missing too often. Other factors, such as which bot has more energy, or which bot is at a less perpendicular angle, can also help you build a 'targetability' factor for a bot.
Another issue is 'thrashing' between the 2 targets. This should be avoided, for 2 reasons:
- Your gun may not be able to turn in time, and you end up shooting into empty space
- You don't focus on killing one bot, and instead inflict a bit of damage to each. This prolongs the time it takes to kill one of the enemy bots, and potentially leaves you in a 1v2 situation.
To avoid thrashing you should only change targets if your enemy's 'targetability' is a certain amount higher than the current target's is. Another option is to only change your target if your
GunHeat is above a certain level, although this will not help for the latter problem described above.
Movement
Two different movement styles have dominated in TwinDuel:
1v1 style RandomMovement:
- This movement style is usually quite aggressive. This is due to the fact that 1v1 style movements are designed to only move perpendicular to one bot at a time, so they get very close to one of the enemies, hoping that only the one enemy (that they are moving perpendicular to) will target them successfully.
- Various methods of implementing the RandomMovement have been tried, from Oscillators to functions that calculate the chance that the bot should reverse this tick. Almost all of the aggressive TwinDuel bots have this type of movement.
Melee style MinimumRiskMovement:
- This movement style is theoretically superior, because it can take both enemies and the teammate into account. Because there are 2 enemies and one teammate, the following things need to, or should be, taken into account:
- Moving perpendicular to the enemies:
- Because you have a teammate, there is a good possibility that only 1 (or none) are targeting a particular one of your bots. You only need to move perpendicular to them if they are targeting you, so be sure to take this into account.
- Staying away from strong enemies:
- If you are far away from weak enemies you may miss them until you are out of energy, but if the enemy is stronger than you it is better to back off until their energy is depleted a bit.
- Staying away from your teammate:
- If you are right next to your teammate it makes it more likely that the enemy's stray bullets will hit you. You might also get hit with friendly fire.
- Not getting in between your teammate and the enemy bots:
- Like above, 'blowby' from the enemy might hit either one of you. Also, you are very likely to get hit by friendly fire.
- Staying away from corners:
- MinimumRiskMovement can get stuck in a local minimum that makes it easy to predict if it gets cornered. Some bots capitalize on this (eg. GrauwuarG), so adding danger to the corners may be useful.
- Reversing every now and again:
- Because there is only one enemy, you do need to worry about getting FlatMovement. (In melee you can usually avoid this by making other bots more 'targetable', and thus never being shot at). KomariousTeam tries to do WaveSurfing, but because they can only do this against one enemy at a time, the other enemy has no problem picking them off.
- Getting in between the enemies, especially in 1v2 situations:
- This means that any of the enemy's missed bullets have a good chance of hitting the other enemy. This strategy is also useful if you stick the non-leader between the two enemies, and make the leader back off. There is a good chance that your non-leader will be killed, but he will also be able to inflict a huge amount of damage on the other 2 bots (even if he won't be causing a lot of the damage), making them easy for your still fresh leader to pick off.
Targeting
Comments/Discussion?
If you want to clarify or add anything guys, feel free to chop and change! Kawigi's MeleeStrategy inspired me to write this, BTW. Credit where it's due =). -- Skilgannon
Nicely done! Still reading, but so far it all looks really good. One thing about the sharing radar, where each bot scans one enemy - I have fit this into a TwinDuel team and in fact, I think I could even fit it into the current LuminariousDuo. But, to my surprise, I didn't find it performing any better than my current radar, and it is about 100 bytes bigger. So I would say: feasible = definitely; worth the size = haven't found it to be yet. -- Voidious
Indeed very nice! The sharing radar is used by my team (which already is mentioned twice). The only problem with it next to the 'one-tick-off' is that in 1v2 situations you have nothing to share and loose 'connection' with the other enemy. About attacking the leader or the non-leader, I found out that there are noticable shifts in performance against some teams (and a lot more bulletdamage inflicted) but that the overall outcome (for me) is almost the same. -- GrubbmGait
Ok, I'll add in the 1-off problem. But seriously, you guys have way more experience with this than me, what I've written is just a rough guidline. I hadn't even considered the 1-off problem. The only experience I have is with NightAndDay, which is a fledgling team, and uses MimimumRiskMovement? and GuessFactorTargeting. So everything else is pure speculation on my part =). Most of it is from watching games against GrauwuarG, which I had serious problems with =). But GrubbmGait, I think it would be much stronger if you used a 'reverse chance' style flattener instead of a double oscillator. The reason is that the oscillator only works at one distance, so the other bots can hit you quite easily when you are far away. Your cornering strategy is still what gets you all your kills against me =) -- Skilgannon
- I know, the strategy is the strong point and the movement the weak point. It still basically is the movement I made 3 years ago and is used in GrubbmGrb, Gruwel and Grinnik. Maybe I should use a (more mainstream) Raiko style flat movement. Lets wait for the next TwinDuel results. -- GrubbmGait