Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2]

Author Topic: AI creation challenge: Design an AI!  (Read 4163 times)

Kashyyk

  • Bay Watcher
  • One letter short of a wookie
    • View Profile
Re: AI creation challenge: Design an AI!
« Reply #15 on: July 17, 2013, 04:22:29 am »

A number of assumptions here. All zeds in a wave spawn at the same time, at the same distance. Another wave doesn't spawn until the entire last wave has been dealt with, there is a list of zombies and their distances and both shots are fired simultaneously.


while alive do
{
   zed first = listOfZeds(TargetSelect(-1)).
   zed second = listofZeds(TargetSelect(first).
   gun.ShootAt(first, second).
}


Also, I have an idea or two for this, do you want me to PM you them?
« Last Edit: July 17, 2013, 04:24:27 am by Kashyyk »
Logged

Octobomb

  • Bay Watcher
  • I like pens
    • View Profile
Re: AI creation challenge: Design an AI!
« Reply #16 on: July 17, 2013, 05:20:20 am »

Yeeeesh. That was quick. Well done! Ill post your results in a bit. And yes, please do pm me any ideas you might have. Ill leave this challenge open for other entries for a while too.
Edit: I am happy to report that your hero (a wave containing) survived 20 zombies! They only have 1hp remaining after a nasty encounter with 2 normals however. Anyone else might want to add something like this: if a zombie gets closer than 20, shoot it with top priority. Also, don't be intimidated by the code. Just write it out normally and that's good enough for me.
« Last Edit: July 17, 2013, 05:42:42 am by Octobomb »
Logged
I saw 5 people with fedoras in my town yesterday.
They're the special biohazard containment agent, out to deal with m'laria.
Sig
Bay12's resident tea drinkers

Grek

  • Bay Watcher
    • View Profile
Re: AI creation challenge: Design an AI!
« Reply #17 on: July 17, 2013, 07:03:48 am »

Sadly, Grek, you end up punching the goblin with the cookies and mangling them. Sooooo, on with the show!

You didn't say that punching the goblin with the cookies was bad.
Logged

Octobomb

  • Bay Watcher
  • I like pens
    • View Profile
Re: AI creation challenge: Design an AI!
« Reply #18 on: July 17, 2013, 07:35:07 am »

You still got your box of cookies didn't you? Bit squished, but still in fine condition.
Logged
I saw 5 people with fedoras in my town yesterday.
They're the special biohazard containment agent, out to deal with m'laria.
Sig
Bay12's resident tea drinkers

Remuthra

  • Bay Watcher
  • I live once more...
    • View Profile
Re: AI creation challenge: Design an AI!
« Reply #19 on: July 17, 2013, 01:17:40 pm »

Can we detect how close the zombies are?

Lenglon

  • Bay Watcher
  • Everyone cries, the question is what follows it.
    • View Profile
Re: AI creation challenge: Design an AI!
« Reply #20 on: July 17, 2013, 02:15:40 pm »

Spoiler: UpdatePriorities() (click to show/hide)
Spoiler: Panic() (click to show/hide)
For (Player.NumShots)
     {
          UpdatePriorities()
          Player.Shoot(ZombieList.GetHighestPriority())
     }

Advantages:
handles any new zombie types added as long as they remain meele
handles variable distances and player hp amounts
handles the addition of bosses that deal more damage than the player has HP
handles continuous spawning of zombies as well as wave-based spawning of zombies
handles variable weapon stats including both variable damage values and variable numbers of shots per turn
has a Panic() function for when the player is about to take lethal damage
Logged
((I don't think heating something that is right above us to a ridiculous degree is very smart. Worst case scenario we become +metal statues+. This is a finely crafted metal statue. It is encrusted with sharkmist and HMRC. On the item is an image of HMRC and Pancaek. Pancaek is laughing. The HMRC is melting. The artwork relates to the encasing of the HMRC in metal by Pancaek during the Mission of Many People.))

Octobomb

  • Bay Watcher
  • I like pens
    • View Profile
Re: AI creation challenge: Design an AI!
« Reply #21 on: July 17, 2013, 04:47:14 pm »

Lenglon, for your ability to think outside the box and put it into code, I salut you. With a double chocolate cookie the size of your head for you. And now, a puzzle courtesy of resident FREAKING GENIUS Kashyyk:
Challenge the First:
Buy as many games on a list as possible during the "Mist Winter Sale" with a certain budget. There is a 25% discount on all games for the length of the sale (NOW ONLY 4 days). Each day, a selection of games is put on the "Daily Deal" offering a 50% discount. For each of the four periods each day, certain games are put on Flash Sale, offering a 75% discount. You don't know which games will get a better discount, or when. A game can howver go on both a Flash Sale and a Daily Deal, but not simultaneously.
Budget = $20.00
Spoiler: Things you can call (click to show/hide)
Spoiler: Variables (click to show/hide)
Spoiler: Shopping List (click to show/hide)
I will note down using a little python script that I will knock up which will decide what's on sale. Unlike the zombies challenge, all sales reamain the same for each AI.
Good luck!
« Last Edit: July 17, 2013, 06:12:07 pm by Octobomb »
Logged
I saw 5 people with fedoras in my town yesterday.
They're the special biohazard containment agent, out to deal with m'laria.
Sig
Bay12's resident tea drinkers

Kashyyk

  • Bay Watcher
  • One letter short of a wookie
    • View Profile
Re: AI creation challenge: Design an AI!
« Reply #22 on: July 17, 2013, 04:57:06 pm »

And now, a puzzle courtesy of resident FREAKING GENIUS Kashyyk:




Logged

Lenglon

  • Bay Watcher
  • Everyone cries, the question is what follows it.
    • View Profile
Re: AI creation challenge: Design an AI!
« Reply #23 on: July 17, 2013, 05:12:20 pm »

are you sure you want to have 28 flash sales when the shopping list is only 6 items long?
I mean, right now I might as well:

While(NotLastQuarterOfLastDay)
     For(All Remaining Games)
          If (Game.IsOnFlashSale AND Game.NotOwnedYet)
               Game.Buy()
For(All Remaining games)
     Game.Buy()
« Last Edit: July 17, 2013, 05:15:31 pm by Lenglon »
Logged
((I don't think heating something that is right above us to a ridiculous degree is very smart. Worst case scenario we become +metal statues+. This is a finely crafted metal statue. It is encrusted with sharkmist and HMRC. On the item is an image of HMRC and Pancaek. Pancaek is laughing. The HMRC is melting. The artwork relates to the encasing of the HMRC in metal by Pancaek during the Mission of Many People.))

Octobomb

  • Bay Watcher
  • I like pens
    • View Profile
Re: AI creation challenge: Design an AI!
« Reply #24 on: July 17, 2013, 05:26:06 pm »

Thing is, you only have $20. Try get another game and ill arrest you for theft

Octobomb.codereveal(cunninglikeafox):
    Octobomb.Selecttarget(Kashyyk)
    Octobomb.compliment(target)
    if Kashyyk.complimentaccept(FREAKING GENIUS) = true.
    Kashyyk.demonstrate(awesome)
    Octobomb.learn(How to run forums games)
Logged
I saw 5 people with fedoras in my town yesterday.
They're the special biohazard containment agent, out to deal with m'laria.
Sig
Bay12's resident tea drinkers

Kashyyk

  • Bay Watcher
  • One letter short of a wookie
    • View Profile
Re: AI creation challenge: Design an AI!
« Reply #25 on: July 17, 2013, 05:34:52 pm »

Not every flash sale will have a game on the shopping list I guess. I was also expecting him to either deuce the number of days or add more games, but hey ho. :P
Logged

Octobomb

  • Bay Watcher
  • I like pens
    • View Profile
Re: AI creation challenge: Design an AI!
« Reply #26 on: July 17, 2013, 06:03:30 pm »

Thought the list was a bit short. More bad puns coming up then :)
Edit: Done. Someone else can try and guess what games I'm making fun of. I added 6 games and shortened it to 4 days, no longer making it possible to buy everything
« Last Edit: July 17, 2013, 06:14:00 pm by Octobomb »
Logged
I saw 5 people with fedoras in my town yesterday.
They're the special biohazard containment agent, out to deal with m'laria.
Sig
Bay12's resident tea drinkers
Pages: 1 [2]