2017-03-03 14:24:41

Over in the "The Limit" game thread, KeyIsFull inspired me to make something new.  The Self Driving game is a game specifically designed for people to program "bots" or "scripts" to play!  Use whatever scripting/coding tool you love, just as long as it is able to read from text files and simulate key presses.  I'm falling asleep here at 7:23am, so I'm going to leave this post shorter than I planned.  The game's readme will answer a lot of questions people may have, but if not, please post them here for me to read when I wake up.

Here is the download link:
(Please note, I have taken down the high score list but people can still choose to play this without it)
www.kaldobsky.com/audiogames/selfdrivingcar.zip

Read the readme before playing, because there are no menus and the game begins the moment it opens!

I have taken down the high score list, but here were the results:
Top 30 scores

1) Aprone 3030
2) Aprone 1874
3) RockyCar 1589
4) Aprone 1454
5) RockyCar 1015
6) RockyCar 943
7) Hannibal 780
8) Aprone 773
9) RockyCar 739
10) Hannibal 710
11) Aprone 701
12) Aprone 554
13) Hannibal 540
14) RockyCar 500
15) 111111111 500
16) Hannibal 432
17) RandomBot 350
18) Hannibal 310
19) Master Chief 300
20) RandomBot2 287
21) tabutcu 217
22) Hannibal 190
23) RandomBot 189
24) Hannibal 189
25) RandomDriver 180
26) Hahahaha ! 180
27) driverless 171
28) 2 149
29) Irniss 149
30) connor 127

- Aprone
Please try out my games and programs:
Aprone's software

2017-03-03 19:08:18

I have a question. in the readme you say the following:
The scanner.txt file only shows 11 rows of the track at a time.  When you first begin, because your car starts at Y coordinate 1 instead of zero, the map data allows your car to see 1 row behind it, the row it is currently in, and 9 rows that are ahead of the car.  If you were to tap the break, you would have 10 rows of track information to examine, and as you speed up you will have less since more of the track is behind you rather than in front.
So let's imagine I am at y 1. I press w to move faster, moving me to y 3. I will then be able to see three rows behind me, and seven in front, right?
Once I move to y 10 by speedupI will not be able to see any more rows ahead of me, right?
If I press s, my viewing distance will move along with me right?
If I press x I will regain some viewing distance, but only up to 10 tiles ahead?

I like to sleep, Sleep is good,
This is how I do it: Lie on a nice warm cozy bed, and dream dreams about how to rule the world!
Follow @TheGreatAthlon5 on twitter for humorous facts and game updates!
If you like my posts, thumb me up!

2017-03-03 19:27:26

KeyIsFull, you are exactly correct with all 3 questions.  big_smile

I'm glad to see some scores showing up on the high score chart.  I didn't know if people would have had to put together "bots" this early, so it was an extra happy surprise to see some had.

I'd love to hear from you guys to know what your design strategies have been.  There are a ton of different approaches to this, and even some of the very simple ones could give good scores if done right.  Obviously the more complex "bots" are going to outperform the simpler ones, but I do think we'll see some impressive scores popping up from people even if they start with a more basic approach.

- Aprone
Please try out my games and programs:
Aprone's software

2017-03-04 00:23:38

I wasn't sure if I should join on this game, you know being the developer and all, but I've started messing around with a bot of my own.  The fact that I wrote the game probably doesn't give me much of an advantage, since we're all working with the same data from the scanner.txt file.  I also thought it would be fun to get the ball rolling, sharing my current ideas for a successful bot.

My first attempt was just for something very basic, where all it does it check to see if the tile in front of it is a wall.  Either "A" or "D" are pushed just to steer the car around the obstacle.  That continued to fail until I realized the car starts out headed straight toward a bit of an upside down V-shape.  By the time my car was about to hit the first wall, it already had a wall on either side.

I started to plan out using "Z" or "C" to get around that situation, but realized none of that would matter unless I look at least 1 extra tile forward.  Still wanting to stick to a simple design, I kept everything the same and just coded the bot to spend the first 2 turns heading to the left.  This avoided the trap I kept getting stuck in, and allowed the bot to travel for quite a while surviving only on those simple steering rules.

My score was really good but it was immediately obvious that I could squeeze a lot more points out of it.  I never had the car speed up or tap the break, so each turn was awarding me 10 points.  I only look 1 tile ahead anyway (right now) so there is no reason to hang back so far.  The next run added in a rule to jump ahead with "W" a few times along the way, and my score soared up to 554.  I'm 100% positive I could adjust the code and have the car speed up earlier in the trip.  The earlier I speed up, the more points I'll end up getting.  I mean it wouldn't be hundreds of extra points or anything, but it may be dozens.

So that's where I got before stopping.  There are so many different approaches to this game it boggles the mind.  Imagine a car that looks ahead 2, 3, 4 tiles ahead and knows to avoid traps.  A car could know when to race forward, and when to back off a bit to see further ahead.  As more people jump into this game and work on bots, I think that high score list is going to explode into a race.

I do hope we get several people who enjoy this game enough to compete.

- Aprone
Please try out my games and programs:
Aprone's software

2017-03-04 13:39:31

Another question:  Do I assume correct when d is pressed that the car travels through the square on the right and then the square in the next row, and not the other way round as in forward then to the right?  Secondly there may be a bug, sometimes I crash twice, or at least get the report twice.  Pressing w at the right point seems to jump the car over the first obstacle.

Try my free games and software at www.rockywaters.co.uk

2017-03-04 17:23:21

When pressing "d", the car technically moves to the right and Then moves forward.  I haven't experienced double crashes messages, so I'm not sure what would be the cause yet.  I've tried to "jump" the car over an obstacle with "w", Hahaha, but no luck.  I must be missing the daredevil perk or something big_smile.  Like the other bug, I guess I'm a little stuck with a solution until I can get it to happen to me, and run tests to figure out what is happening.

- Aprone
Please try out my games and programs:
Aprone's software

2017-03-04 18:02:49

Hi.
I don't get how the game works.
The car drives automatically. Do you have to press w or any other of the control keys each second? How do you know what to press, since the only sound is the noise which counts each second? I feel a bit stupid for not getting how the game works... smile

Best regards SLJ.
Feel free to contact me privately if you have something in mind. If you do so, then please send me a mail instead of using the private message on the forum, since I don't check those very often.
Facebook: https://facebook.com/sorenjensen1988
Twitter: https://twitter.com/soerenjensen

2017-03-04 19:20:50

SLJ, you could think of the game being split up into turns.  Each time you press a key, you take a turn.  If you don't take a turn for 1 full second, the game automatically takes a turn for you by pressing "S".  Each new turn, a file called scanner.txt is created which contains info about the world around your car.  You can open that file with some sort of program or script that you write, have it understand where walls and open area are, and then let it intelligently drive the car in a safe path.  Only a computer program would be quick enough to read that file each time, which is why the game is meant for people who want to build their own "bot" to drive the car for them.

- Aprone
Please try out my games and programs:
Aprone's software

2017-03-04 20:22:16

Thanks Aprone. Now I get it. I can't read as fast as a script, and it makes sense why I failed at the game when trying to play it. Lol.

Best regards SLJ.
Feel free to contact me privately if you have something in mind. If you do so, then please send me a mail instead of using the private message on the forum, since I don't check those very often.
Facebook: https://facebook.com/sorenjensen1988
Twitter: https://twitter.com/soerenjensen

2017-03-04 20:23:32

Aprone,

Thanks for this fun challenge.

My first step is going to be to try to write some Python code that will start the program, press keys, and read the scanner file.  While I am not new to programmer, I am new to Python so this makes for a good learning exercise. If I can get it to work in a way that would let others just write the AI code, I think I might put it up on GitHub.

To that end, I have a couple questions.

* Is it right to assume that when the car crashes, the scan file will have a 1 at the position in the scan field where the car is?
* Does the player win if their car reaches or passes position 1000 or if they reach turn 1000 without crashing?

I also want to check to see if an assumption I am making is correct.

At turn 0, the scan file includes all the information about the field from position 0 through 9.

At turn 10, it contains all the position information for the field from positions 10 to 19.

So each turn, the scanner includes position information for a 7 x 10 grid that starts with the position that is the same as the turn number.

Is that correct?

Please, do not feel like you have to answer any of these questions if you think that will ruin the fun for others.

2017-03-04 21:00:38

Hektor, my tip would be to write your bot so that it loops and checks to see if scanner.txt exists.  If it does not, just wait a moment and loop through to check again.  This will let you delete the file between attempts, start up your bot, and then start up the car game in that order.  There would be no risk of your bot trying to type, with the car game out of focus.  Just my thoughts based on what seems to work well for me.

When the car crashes, it actually crashes and stops the progress of the car before the scanner file is updated, so there should be no point where the car's coordinates show up as a wall.

If the car reaches position 1000, the program pops up a victory message, stops the car, and takes you to the same submit score point you normally see when crashing.

At turn 0 the scan file should include all information about the field from position 0 through 10, not 9.  Then at turn 10 it contains information from positions 10 to 20.  It is always the current turn, to the current turn plus 10.  It will always be a 7 x 11 grid.

I look forward to seeing you pop up on the high score list!  big_smile

- Aprone
Please try out my games and programs:
Aprone's software

2017-03-06 20:08:15

Hmm, seems like this would be the perfect game to play around with programming.

2017-03-07 18:00:23

Hey guys, we didn't have a ton of participants but I'm happy for the ones we did have.  As you can see by the final scores (post 1), people started to get the hang of the game.  I managed to keep my hold on the top position, but Hannibal and Rocky kept me on my toes.  They each captured the top spot at different times, and forced me to go back and modify my approach.

Thanks for playing guys, and I may make some future games along this theme.

- Aprone
Please try out my games and programs:
Aprone's software