screeps icon indicating copy to clipboard operation
screeps copied to clipboard

Autoattack

Open TooAngel opened this issue 8 years ago • 6 comments

Two auto attacking logics:

Simple defense test: If a new player shows up, multiple waves of multiple level are send to that player to make sure their defense level fits is advanced enough for the area (https://github.com/TooAngel/screeps/blob/master/FAQ.md#why-am-i-being-attacked-without-being-on-the-list)

  1. A simple ATTACK, MOVE (multiple times, depending on the energy available)
  2. A squad (DISMANTLER, multiple HEALERS) are send (https://github.com/TooAngel/screeps/issues/35)

Kill room: If the players idiot counter is higher than threshold a room is selected and will be attacked. A ranged creep will move around the room to prevent external harvesting. Squads (simple attack level 2) are attacking, best from multiple sides, if possible. Creeps are spawned until the last spawn is killed. After that the vision is kept available by sending a simple (MOVE) creep, destroying new construction Sites. On defending creep appropriate counter attacks should be launched (Defender?)

Squad definition: squads maybe should change thier name into: intention + targetRoomName, so we can spawn missing creeps later, if needed create configs for squad intention size, so we can play with different setups intentions should be grouped roles aka Squads like: [remote-heal, build-defence or repair-defence, flee] like 'healers and builders' and [tank, dismantle, self-heal, no-flee] like 'tanks' and [tank, attack, ranged-attack, flee] like 'attackers'

TooAngel avatar Jan 03 '17 16:01 TooAngel

Would like to start the discussion about that topic here. Will update the description depending on the discussion.

First description as reference: Two auto attacking logics:

Simple defense test: If a new player shows up, multiple waves of multiple level are send to that player to make sure their defense level fits is advanced enough for the area (https://github.com/TooAngel/screeps/blob/master/FAQ.md#why-am-i-being-attacked-without-being-on-the-list)

  1. A simple ATTACK, MOVE (multiple times, depending on the energy available)
  2. A squad (DISMANTLER, multiple HEALERS) are send (https://github.com/TooAngel/screeps/issues/35)

Kill room: If the players idiot counter is higher than threshold a room is selected and will be attacked. A ranged creep will move around the room to prevent external harvesting. Squads (simple attack level 2) are attacking, best from multiple sides, if possible. Creeps are spawned until the last spawn is killed. After that the vision is kept available by sending a simple (MOVE) creep, destroying new construction Sites. On defending creep appropriate counter attacks should be launched (Defender?)

TooAngel avatar Jan 03 '17 16:01 TooAngel

Qs:

  • the 2nd one is called brain.startSquad, or not?
  • where is the 1st one implementedor, is'n yet?

thoughts:

  • squads maybe should change thier name into: intension + targetRoomName, no need for random number sufix, so we can spawn missing creeps later, if needed
  • create configs for squad intension size, so we can play with different setups
  • intensions should be grouped roles aka Squads like:
    • [remote-heal, build-defence or repair-defence, flee] like 'healers and builders' and
    • [tank, dismantle, self-heal, no-flee] like 'tanks' and
    • [tank, attack, ranged-attack, flee] like 'attackers'
  • the level of an autoattack should depending on
    • my GCL and my room RCL
    • opponent level
    • opponent GCL and RCL
    • opponent controller raising factor in (configurable) intervals e.g. on 10k Game ticks
  • autoattack should NOT be room independent, squad should be spawned by all my rooms in a (configurable) range e.g: 3 to 5
  • autoattack should have a wave counter
  • autoattack should have gather, finish and pause states

mschultheiss83 avatar Jan 04 '17 03:01 mschultheiss83

Yes, 2nd is brain.startSquad, not yet integrated in the automatically trigger, https://github.com/TooAngel/screeps/pull/48 will change that.

1st attack is called attack0 :-) https://github.com/TooAngel/screeps/blob/master/src/prototype_room_attack.js#L47 is currently the logic for that. https://github.com/TooAngel/screeps/blob/master/src/prototype_room_attack.js#L48 more simplified just queue creep and send.

TooAngel avatar Jan 04 '17 14:01 TooAngel

I like the intensions idea, will add it to the description.

TooAngel avatar Jan 04 '17 14:01 TooAngel

level of an autoattack

  • autoattack has a wave counter (https://github.com/TooAngel/screeps/blob/master/src/prototype_room_attack.js#L116) counter could be renamed to wave

My initial idea behind the 'simple defense test' was to keep my area free from new players without noteworthy defense. The increasing level should hide the fact that it is an AI, by slowly increasing the strength somehow as a human player would do. The strength of the creeps should be the strongest possible, if it is too much it doesn't matter.

If you are referring to Kill room. That is not yet well thought throw, can be adaptable to the opponents strength level. I'm also thinking about something like a 'thread' level as counter metric to the 'idiot' counter. E.g. if another player was able to kill one of our rooms, the 'thread' level will raise and an autoattack is not trigger as quickly as on other players.

I usually try to keep the logic (somehow) simple, measuring and calculating these metrics and making a decision based on the metrics introduces more complexity. I'm also fine with this, we should just give it some more thought, if it is worth the effort compared to the advantage it brings.

TooAngel avatar Jan 04 '17 15:01 TooAngel

s/intension/intention/g

ghost avatar Jan 04 '17 15:01 ghost

Updated the diplomacy module, add documentation within the next PR and close this issues.

TooAngel avatar Mar 11 '23 13:03 TooAngel