
Show HN: Quake 1 movement physics reinforcement learning project - kipi
https://github.com/matthewearl/q1physrl
======
kodisha
Prepare for something awesome

Human run [1] vs scripted bot run [2].

This is from DFWC, a race series that takes place every second year, and using
modified Q3 engine.

There are 5-7 maps per season, and people race from start to finish, and best
time wins.

Also, each round there is scripted run, to show how far you could push the
engine physics, if you had inhuman reflexes. Highly recommend browsing entire
YT channel, it's really awesome, if you ever played Q3!

[1] [https://youtu.be/FUguBKICPVk](https://youtu.be/FUguBKICPVk)

[2] [https://youtu.be/g28ObPwPE34](https://youtu.be/g28ObPwPE34)

~~~
amelius
I don't know what I just watched, but these movements seemed not very
physically accurate to me.

~~~
slow_donkey
The goal is to push the limits of the game's physics not real life. Quake
based games allow you to retain speed when jumping at the same 'frame' as
landing (bunny hopping) and slide up slopes with enough speed.

These physics create a high skill ceiling for speed runs and in normal play
because of how powerful movement becomes during play.

------
mrob
Karl Jobst has a Youtube video covering the speedrunnning record history of
Quake's first level, which serves as a good overview of Quake movement
technique:

[https://www.youtube.com/watch?v=43d8fICz6gM](https://www.youtube.com/watch?v=43d8fICz6gM)

It starts with an explanation of the significance of Quake to speedrunning as
a whole, so skip to 5:46 if you only want to see the movement tech.

~~~
dopeboy
This is an incredible video - thanks for sharing. Couple notes for those like
me who are new to the speed running world:

* The goal here is to get through a particular level as fast as possible. Not to kill enemies or get points; it's just speed.

* The physics engine computes a speed for your player. There are some movements that increase it and some that decrease it. What these speedrunners are doing are (1) finding techniques in movement (2) exploiting features of the map that result in increasing their speed and maintaining it.

* These techniques include running along a wall (unclear to me why this increases or maintains speed), bunny hopping (jumping and turning at the same time in such a way where you don't pick up friction), leveraging features in a map to give you added speed (blowing up an explosive barrel and using its shock to speed you up).

* Over the course of 20 years, players have managed to get the record from 30 seconds down to its current 20 seconds for the quake map in question.

As someone who spent many hours playing Quake 2 on multiplayer, the best
players moved in a rhythm similar to how the speed runner players do here.

~~~
tonyarkles
Speculating here based on my experiences in the past building my own physics
engines: running along a wall could speed you up a little bit depending on how
they’re handling “keeping you outside the wall”. One common/simple way is to
apply x1 = x0 + v*dt, calculate collisions after the moment calculation, and
then fudge your position back to being inbounds. If I recall, Q1 used simple
bounding boxes on all of the entities as well and there’d probably be some
(pardon the pun) corner cases in the “keep out of the wall” algorithm.

------
lgl
This is great, I always wondered if one could train an AI to play god level
quake as they've done with DOTA and other games since it's such a quirky
engine with so many niche and semi obscure moves and tactics.

For anybody wishing to try or revisit the game you can download the nquake
pack [0] which a free and ready to go version of the game that includes the
shareware portion of the original game and some gpl'd maps that are the most
commonly used (if you own the original game you can just copy the
\id1\pak1.pak file to the install folder and delete the gpl maps pak). Also
included is the ezQuake [1] build which is a modern implementation of the
engine that everybody uses these days and features lots of tweaks for improved
graphics, fps, teamplay, better menus, better server browser and a lot more.

Then you can use a website like badplace [2] where you can look for servers
and see who's playing. From there you can join or just watch some games by
clicking the observe or QTV links (if you registered the qw:// handler during
install/first launch).

It's still a brilliant game and there's still a relatively decent community
playing everyday although the skill level is of some of these players is truly
insane.

[0] [https://www.nquake.com/](https://www.nquake.com/)

[1] [https://ezquake.github.io/](https://ezquake.github.io/)

[2] [https://www.badplace.eu/](https://www.badplace.eu/)

------
rhaksw
Wild, I was just playing QW a week ago for the first time in 20 years and
someone was showing me how to do this running technique after destroying me in
a one on one.

------
sjm
This is awesome -- I grew up playing Quake 1 and really fell in love with it
more as we as a community learned to exploit the movement physics. Still my
favourite FPS and still arguably the one with the steepest learning curve.

I didn't have a chance to watch the video yet, but out of curiosity does this
actually use QuakeWorld or base Quake 1? As I remember the physics are
different between the two, right?

~~~
kipi
It's the Quake 1 physics, not QW. I haven't looked at the QW physics in
detail, but I think the main difference is that there's a single frame of
ground friction applied between every jump, which ends up making a difference
to the optimal techniques.

------
xenonite
Given the fully trained RL model, would it be possible to infer and explain
the optimal movement technique in terms of a simple rule set?

------
bnegreve
How difficult would it be to encode the optimal running technique as a rule
instead of learning it with RL?

~~~
fdalvi
It wouldn't be difficult at all if the optimal running technique was known
before hand; I think the goal of many of these RL exercises is to either i)
find a better solution than what we may have imagined or ii) confirm that our
knowledge was indeed the best possible solution!

~~~
bnegreve
> It wouldn't be difficult at all if the optimal running technique was known
> before hand;

You're right, but this is a simulated environment. It means the physics in it
are driven by a small set of known (and most likely deterministic) rules.

So I wonder if it would it be possible to analytically determine what is the
best possible running strategy.

------
hcarvalhoalves
I just thought that's the geekiest thing I've seen in a while... good job! :)

------
marcinzelent
That's a really cool project! And it made me want to play Quake again.

~~~
tonyarkles
[http://fte.triptohell.info/demo](http://fte.triptohell.info/demo)

There ya go!

------
airstrike
Now do CS:GO!

