3

While this question can sound a bit sci-fi I am serious about it. Is it possible to warp time for a virtual environment and make a virtual machine act faster? I am trying to learn my neural network how to play an old game and it's speed is not limited by my hardware. I think that it would perfectly allow to increase game speed 10 times at least while the game itself has no option for it.

Just to be clear: I want to make lets say 1 real time second to be equal to 10 seconds in game to speed up the training process.

Kosh
  • 228
  • 1
    I suspect the commenters (or me) misunderstand what you are asking, so you may want to clear it up - I read it that you are wanting to speed up the rtc so that 1 second in real time takes 0.1 second to elapse. I think others suspect a bottleneck I'm hardware despite what you have said! – davidgo Jun 16 '20 at 05:31

2 Answers2

3

You did not specify the OS or your (preferred? actual?) virtual environment. In Linux see man 1 faketime. Example usage:

faketime -f '+0 x10' watch -n 1 date

It may or may not help. If Linux is the host, maybe you will manage to run an entire guest OS with faketime. If the game in question runs under Linux, maybe you will manage to run the game itself with faketime.

2

There is nothing special at all about a virtual environment. The host machine will only go as fast as it can go. Virtual machines will operate near that speed but a bit slower (and a lot slower if on a hard drive vs. SSD).

The game then will only go as fast as it can on the machine running it (host or virtual).

Virtual machines are not normally speed daemons.

The clock on the VM is a function of the virtual hardware and is very much tied to the host machine

John
  • 49,923
  • Certainly I understand this. But as I said I am not limited by my hardware and my game is not getting slower. I am thinking about if it is possible to mess with the clock of my virtual environment to make it think that the time is passing faster. – Kosh Jun 15 '20 at 23:02
  • No. I do not think that can happen (faster than machine) – John Jun 15 '20 at 23:04
  • What clock: the actual time, or the CPU clock, and which of these will result in the game moving more quickly. – music2myear Jun 16 '20 at 02:15
  • Your best bet would be to make the emulator (or whatever software you are using) go faster. – Shaun Webb Jun 16 '20 at 02:25
  • "What clock: the actual time, or the CPU clock" The Virtual Machine clock cannot go faster than the Host Clock. – John Jun 16 '20 at 11:13