Live data from Hacker News

Ask HN: Building a game for AI Research

news.ycombinator.com

21–30 of 38 posts

Re: Ask HN: Building a game for AI Research

#21
post #11

Earlier quoted context omitted.

May I ask what do you mean by "RNG state should be seedable"?

If the game depends on random events (eg an attack does random damage between 3-8) it would be useful to make sure it's always the same randomness, if you want it at least.

Same randomness? I can't get gist of the term.

Re: Ask HN: Building a game for AI Research

#22
post #11

Earlier quoted context omitted.

If the game depends on random events (eg an attack does random damage between 3-8) it would be useful to make sure it's always the same randomness, if you want it at least.

Same randomness? I can't get gist of the term.

Typically when you init a random generator, it'll let you pass a number in if you want to. That will set the sequence of "random" output from the generator; different seeds will be random with respect to each other. If you re-use the same seed you'll get the same sequence of "random" numbers as before. This is useful to test or re-try sequences involving "random" in a reproducible way.

Re: Ask HN: Building a game for AI Research

#23
post #11

Earlier quoted context omitted.

If the game depends on random events (eg an attack does random damage between 3-8) it would be useful to make sure it's always the same randomness, if you want it at least.

Same randomness? I can't get gist of the term.

It's because most of the randomness used by software is actually pseudorandom. What that means is that you actually use a defined sequence. The sequence has behaviour that's close enough to what you'd get if you were picking random samples from a distribution for the desired application.

The key difference is that it's reproducible and that if you have insight into the parameters of the sequence (e.g. the seed and the current position in the sequence), you can predict the results. That's why people often get upset when people use these pseudorandom number generators for security purposes.

The seed is a value that is used to generate the sequence. If you use the same seed, you get the same sequence.

Re: Ask HN: Building a game for AI Research

#24
post #11

Earlier quoted context omitted.

If the game depends on random events (eg an attack does random damage between 3-8) it would be useful to make sure it's always the same randomness, if you want it at least.

Same randomness? I can't get gist of the term.

Most random sources are PRNG rather than 'true' random sources, and sometimes it's useful (for debugging, for analysis or just for interest) to be able to use a predictable pattern of otherwise random numbers.

One way is to allow some way of 'seeding' the PRNG such that the order of the numbers it produces is the same each time, as we return the random function back to a known state.

Or, by example, if I make 5 calls to the PRNG with seed value '0' and see the following: [5, 2, 9, 18, 4, ...] and that causes the agent I'm testing to do something utterly weird, so I want to re-run my agent to observe the effect in detail to debug it, and for that to happen, I need the same [5, 2, 9, 18, 4, ...] sequence, otherwise I'll be forced to run repeatedly until I observe the same glitch, so by re-seeding the PRNG to '0', it will then predictably return that sequence, rather than a new, random sequence.

Re: Ask HN: Building a game for AI Research

#25
I wish more people would use (or expose) 0AD engine (an open source Age of Empires-like game) in AI research, even though I know Starcraft2 is where most of the focus is these days).

https://github.com/0ad/0ad/tree/master/binaries/data/mods/pu...

https://github.com/agentx-cgn/Hannibal

Nearly everything bullet pointed in that list is there.

Edit: Should also mention there is the Halite AI challenge, https://halite.io

Re: Ask HN: Building a game for AI Research

#26
Lots of great suggestions in here!

The General Video Game AI (GVGAI) environment has also just released their own Gym for training. With the competition set to run through CIG'18 in July 2018

https://github.com/rubenrtorrado/GVGAI_GYM/

IEEE Conference on Computational Intelligence and Games Competitions

https://project.dke.maastrichtuniversity.nl/cig2018/?page_id...

It's okay to start out small. It's not necessary to clone StarCraft to investigate high dimensional game state spaces. Remember it was a simple 2D board game like Go that was until recently considered unbeatable ;)

Take a look at games like Generals or Tron Light Cycles. Best of Luck!

http://dev.generals.io/

https://web.stanford.edu/~jbboin/doc/ai_lightcycle.pdf

Re: Ask HN: Building a game for AI Research

#27
post #11

Earlier quoted context omitted.

If the game depends on random events (eg an attack does random damage between 3-8) it would be useful to make sure it's always the same randomness, if you want it at least.

Same randomness? I can't get gist of the term.

In addition to the other explanation, check out today's NYT article on how one guy cracked the lottery because of pseudo-random behaviour in the lottery code.

https://www.nytimes.com/interactive/2018/05/03/magazine/mone...

Post reply on HN