Welcome, Guest

Author Topic: Wargame (Game 3)  (Read 18359 times)

vh

  • formerly mudkipz
  • *****
  • Posts: 1140
  • "giving heat meaning"
Wargame (Game 3)
« on: September 18, 2015, 05:48:14 PM »
This is a forum game.
Each game, players construct armies of Objects, and then a simulated battle is fought.
All you need to do to participate is assemble an army.

---

Each Object has 7 parameters: health, base damage, attack1, attack2, defense1, defense2 and strategy
Each Object costs a certain amount to make.
You can make as many objects of as many types as you want as long as the total cost does not exceed 1000.
Here is a script to calculate an Object's cost: https://dl.dropboxusercontent.com/u/42218552/costscript.py?dl=1

In battle, each Object attacks Objects which are not on the same side.
strategy is how the Object acts in battle.
A strategy is told how much damage an Object did, and how much damage an Object received, and how much the target of the Object initially cost.
The strategy will decide whether the Object will keep attacking, switch targets, or hide for one time-step.

To create a single Object, first write the name of the Object.
Then, on the next line, write down the parameters of your Object, seperated by commas.
The strategy should be written down on a separate line in English, and I will translate it to code.
To create your army of Objects, simply list the number of Objects you want of each type.

To submit your army, first add some random letters on the last line of your file.
Then save your file, and paste it into here: https://sha3calculator.appspot.com/
Press Calculate Hash, and paste the result to this forum thread.
After this, do not edit your text file.
When the time comes, I will ask you to paste your text file onto the thread.

--

How is damage calculated?

Each timestep, an object does some damage to its target. This damage is determined by a few things.

The base damage is exactly what it sounds like. It's the damage done, ignoring the multiplier.

The multiplier is determined by two factors.
The first is your attack 1, minus the enemy's defense 1, plus a constant, 0.75.
The second is your attack 2, minus the enemy's defense 2, plus a constant, 0.75.

These factors are capped at 0, so you can't do negative damage.

The multiplier is simply the product of these two factors.

This is important because your attack must be strong enough to get through both defenses.
Otherwise, if one of your factors is zero, your entire multiplier is zero.

But the multiplier has limits too.

The multiplier can't exceed 1, so you can't ever do more than your base damage.
The multiplier also can't be below a certain number. This is so you can bang against a heavily armored target and still do a small amount of damage.
The minimum multiplier is 0.1 divided by the enemy's defense 1 plus defense 2.

Finally, multiply the base damage by the multiplier to get the final damage.

---

How does battle work?

Each object has four possible statuses
1. attacking
2. switching targets
3. hiding
4. dead

If an object is in the attacking status, it will continue attacking it's current target.
If an object is in the switching target status, it will pick another target and attack it in the same turn.
If an object is hiding, whichever objects are targeting that object will switch their targets. A hiding object cannot attack. Also, an object cannot hide two turns in a row.

After the attacking round, a calculation is done to determine which objects have been killed. At this point, objects decide between attacking, switching targets, or hiding, with their strategy.

--

Post if interested.
« Last Edit: October 12, 2015, 11:27:08 AM by vh »

FiahOwl

  • *****
  • Posts: 1234
  • This is, to give a dog and in recompense desire my dog again.
Re: Wargame
« Reply #1 on: September 18, 2015, 06:29:34 PM »

This message is only viewable with Universe Sandbox Galaxy Edition. Access it and much more with promo-code '156686'.

« Last Edit: March 22, 2021, 01:17:25 AM by FiahOwl »

Darvince

  • *****
  • Posts: 1842
  • 差不多
Re: Wargame
« Reply #2 on: September 18, 2015, 06:31:10 PM »

vh

  • formerly mudkipz
  • *****
  • Posts: 1140
  • "giving heat meaning"
Re: Wargame
« Reply #3 on: September 18, 2015, 06:53:00 PM »

blotz

  • Formerly 'bong'
  • *****
  • Posts: 813
  • op pls
Re: Wargame
« Reply #4 on: September 18, 2015, 07:42:24 PM »
cb04fbbbcbe7c90abe4c99cfa7504447e1e362c43d98ae32ae561387e8c09bfd

this was just a random test
« Last Edit: September 21, 2015, 12:39:19 PM by blotz »

vh

  • formerly mudkipz
  • *****
  • Posts: 1140
  • "giving heat meaning"
Re: Wargame
« Reply #5 on: September 18, 2015, 09:22:55 PM »
Update:
Set a minimum value on the multiplier
Reduced base cost (w) from 1.0 to 0.5
Added more info in details section

Round 1 will start when there are 3 hash submissions or 3 days have passed, whichever is first.


---

edit: just updated the cost function to make it more complicated. good luck
« Last Edit: September 18, 2015, 09:46:29 PM by vh »

vh

  • formerly mudkipz
  • *****
  • Posts: 1140
  • "giving heat meaning"
Re: Wargame
« Reply #6 on: September 18, 2015, 10:04:11 PM »
edit: i changed a lot of constants but i think i'm done now. bring on the submissions.

Quote
Round 1 will start when there are 3 hash submissions or 3 days have passed, whichever is first.

Bla

  • Global Moderator
  • *****
  • Posts: 1013
  • The stars died so you can live.
Re: Wargame
« Reply #7 on: September 19, 2015, 03:11:40 AM »
I think I'm interested, but I haven't looked at the game in details yet

vh

  • formerly mudkipz
  • *****
  • Posts: 1140
  • "giving heat meaning"
Re: Wargame
« Reply #8 on: September 19, 2015, 09:01:17 AM »
8626ad975b08744dae551eec2dff4eeebd44e1556bf458bb355433bd3ce586e3

vh

  • formerly mudkipz
  • *****
  • Posts: 1140
  • "giving heat meaning"
Re: Wargame
« Reply #9 on: September 21, 2015, 06:30:48 AM »
bump because more interested people actually have to submit their hash

blotz

  • Formerly 'bong'
  • *****
  • Posts: 813
  • op pls
Re: Wargame
« Reply #10 on: September 21, 2015, 12:36:17 PM »
wht happens if there are 2 objects, who attacks first?

blotz

  • Formerly 'bong'
  • *****
  • Posts: 813
  • op pls
Re: Wargame
« Reply #11 on: September 21, 2015, 12:39:26 PM »
ok i made a real one
662d2a895a7889d23bcf36b43b50601104730fa8b9eab277f015f7a1296ecc9f
everyone quote it

vh

  • formerly mudkipz
  • *****
  • Posts: 1140
  • "giving heat meaning"
Re: Wargame
« Reply #12 on: September 21, 2015, 01:47:44 PM »
In case I haven't made it clear, all the parameters can be any non-negative real number

Darvince

  • *****
  • Posts: 1842
  • 差不多
Re: Wargame
« Reply #13 on: September 21, 2015, 01:50:39 PM »
pi

Bla

  • Global Moderator
  • *****
  • Posts: 1013
  • The stars died so you can live.
Re: Wargame
« Reply #14 on: September 21, 2015, 01:53:14 PM »
d4cdd0b0c54805619876a618740fc44c6518bbfbcc3bf726eb3c242628e859bc

you are all doomed.

vh

  • formerly mudkipz
  • *****
  • Posts: 1140
  • "giving heat meaning"
Re: Wargame
« Reply #15 on: September 21, 2015, 01:53:26 PM »
yes - it can be any arbitrarily-close, rational approximation to pi.

Darvince

  • *****
  • Posts: 1842
  • 差不多
Re: Wargame
« Reply #16 on: September 21, 2015, 01:54:49 PM »
you said any non-negative real number, pi is real

vh

  • formerly mudkipz
  • *****
  • Posts: 1140
  • "giving heat meaning"
Re: Wargame
« Reply #17 on: September 21, 2015, 02:02:17 PM »
if your computer has infinite ram go ahead with pi.

vh

  • formerly mudkipz
  • *****
  • Posts: 1140
  • "giving heat meaning"
Re: Wargame
« Reply #18 on: September 21, 2015, 02:03:25 PM »
btw objects attack simultaneously

FiahOwl

  • *****
  • Posts: 1234
  • This is, to give a dog and in recompense desire my dog again.
Re: Wargame
« Reply #19 on: September 21, 2015, 03:37:25 PM »

This message is only viewable with Universe Sandbox Galaxy Edition. Access it and much more with promo-code '156941'.

« Last Edit: March 22, 2021, 01:17:12 AM by FiahOwl »

blotz

  • Formerly 'bong'
  • *****
  • Posts: 813
  • op pls
Re: Wargame
« Reply #20 on: September 21, 2015, 03:40:42 PM »
ok i made a real one
662d2a895a7889d23bcf36b43b50601104730fa8b9eab277f015f7a1296ecc9f
everyone quote it
099e4f9a045fa990d6f57051c780d2a0a3b951752e3ca31c9a0c64711dd863bc
d4cdd0b0c54805619876a618740fc44c6518bbfbcc3bf726eb3c242628e859bc

you are all doomed.

just logging things. if no one changes things in 4 minutes and no one edits things, this is un-ofc i gues

atomic7732

  • Global Moderator
  • *****
  • Posts: 3849
  • caught in the river turning blue
    • Paladin of Storms
Re: Wargame
« Reply #21 on: September 21, 2015, 04:15:05 PM »
afb332bbfab60735866528c69a9764af497d0b8e9d198b2855f9ecc53f6b5693

blotz

  • Formerly 'bong'
  • *****
  • Posts: 813
  • op pls
Re: Wargame
« Reply #22 on: September 21, 2015, 04:35:53 PM »
guys i forgot my strat: on here's my real real hash. i'll post both texts later
23e8efcdb2037a7445869712406728266b3f5b031e2f96d84ae1da1e4f9debe2

vh

  • formerly mudkipz
  • *****
  • Posts: 1140
  • "giving heat meaning"
Re: Wargame
« Reply #23 on: September 21, 2015, 08:43:43 PM »
ok people post your submissions in text inside code tags

vh

  • formerly mudkipz
  • *****
  • Posts: 1140
  • "giving heat meaning"
Re: Wargame
« Reply #24 on: September 21, 2015, 08:45:16 PM »
I wrote mine directly in code to save time. yours doesn't have to look like this.
If anyone has questions about what this code means they can ask.

Code: [Select]
def makestrat(mindo, maxtake = float('inf')):
    def strat(send, recv):
        if recv > maxtake:
            return 2
        elif mindo > send:
            return 1
        else:
            return 0
    return strat

def lincom(objdict):
    results = []
    for o, n in objdict.items():
        results.extend([copy.deepcopy(o) for x in xrange(n)])
    return results
   
T1 = Obj([0.5,0.5],[0.0,0.0],1.0,1.0,makestrat(0.3), side = 'K', id = 'T1')
T2 = Obj([0.5,0.5],[0.2,0.2],2.0,2.0,makestrat(0.75), side = 'K', id = 'T2')
TN = Obj([0.5,1.5],[0.4,0.4],2.0,5.0,makestrat(1.0,2.0), side = 'K', id = 'TN')
TM = Obj([1.5,0.5],[0.4,0.4],2.0,5.0,makestrat(1.0,2.0), side = 'K', id = 'TM')
TQ = Obj([0.5,0.5],[0.5,0.5],5.0,7.0,makestrat(3.0,2.5), side = 'K', id = 'TQ')
TX = Obj([5.0,0.5],[0.5,0.5],3.0,5.0,makestrat(2.0,2.0), side = 'K', id = 'TX')
TY = Obj([0.5,5.0],[0.5,0.5],3.0,5.0,makestrat(2.0,2.0), side = 'K', id = 'TY')

Kom = lincom({T1:66, T2:80, TN:8, TM:8, TQ:15, TX:4, TY:4})
print sum((o.getcost() for o in Kom))

#jsdfklajsfkld;asjkfdls;ajksl;jks;flajdksl;fajksdl;fjasklf;dsa

vh

  • formerly mudkipz
  • *****
  • Posts: 1140
  • "giving heat meaning"
Re: Wargame
« Reply #25 on: September 21, 2015, 08:55:14 PM »
this is fiah's sub it doesn't match his hash because he had to remove some spaces from his numbers. i don't think it'll help much though

http://pastebin.com/A4c2Z9FT

atomic7732

  • Global Moderator
  • *****
  • Posts: 3849
  • caught in the river turning blue
    • Paladin of Storms
Re: Wargame
« Reply #26 on: September 21, 2015, 09:06:51 PM »
Code: [Select]
aeridanisucks
80,13.8944,5,2,4,2
no strats just skill
ooiqiqiqiqiqin9cjdhakjfhewisoabds4444323534

vh

  • formerly mudkipz
  • *****
  • Posts: 1140
  • "giving heat meaning"
Re: Wargame
« Reply #27 on: September 21, 2015, 09:09:56 PM »
great job

Darvince

  • *****
  • Posts: 1842
  • 差不多
Re: Wargame
« Reply #28 on: September 21, 2015, 09:35:48 PM »
Code: [Select]
type needle
1,1,0.1,0.1,0.2,0.2
attack then hide if below 0.5 health, attack every turn after
500 of type needle
 
type boulder
25,2,0.3,0.3,1,1
attack only, switch targets when i am below 12 health
10 of type boulder

vh

  • formerly mudkipz
  • *****
  • Posts: 1140
  • "giving heat meaning"
Re: Wargame
« Reply #29 on: September 21, 2015, 09:39:30 PM »
by the way we're allowing late submissions for this battle because uh it'll be more interesting and i don't think we've gotten to the point where it's so competitive that this actually matters.