ASMR Programming - Coding Snake A.I. - No Talking

ะŸั€ะพัะผะพั‚ั€ะพะฒ: 83, 483   |   ะ—ะฐะณั€ัƒะถะตะฝะพ: 3 ะณะพะด.
icon
Servet Gulnaroglu
icon
1, 308
icon
ะกะบะฐั‡ะฐั‚ัŒ
iconะŸะพะดั€ะพะฑะฝะตะต ะพ ะฒะธะดะตะพ
Hello my dear coders,
Hope you like the video. It was my first reinforcement learning experience. I must say it wasn't easy.

My best score was 66, as in the video. I want you to mention your highest scores in the comments, with alpha and gamma values.

This code may be enhanced by adding more states to the RLSnake function. The snake fails when it gets trapped by itself. So we need to add a state that if the snake is in a trap or not.

Please, like and subscribe!
Enjoy and safe coding :)

Twitter:

๐Ÿ‘จโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป
Source code :
Live a star on github, if you enjoy!
๐Ÿ‘จโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป


๐Ÿ“ฆ๐Ÿ“ฆ๐Ÿ“ฆ๐Ÿ“ฆ๐Ÿ“ฆ๐Ÿ“ฆ๐Ÿ“ฆ๐Ÿ“ฆ๐Ÿ“ฆ๐Ÿ“ฆ๐Ÿ“ฆ๐Ÿ“ฆ๐Ÿ“ฆ๐Ÿ“ฆ๐Ÿ“ฆ
All the products in this video

โŒจ๏ธ Keyboard: IQUnix OG80 Wormhole TTC ACE switches and Costar Stabilizers (5% discount)


๐Ÿ–ฑ๏ธ Microsoft Bluetooth Mouse


๐Ÿ–ฅ๏ธ Monitor Asus MX239:


๐Ÿ–ฅ๏ธ Monitor Dell 34 Curved Monitor - S3422DW:


๐Ÿ’ป 2021 Apple MacBook Pro (14", Chip Apple M1 Pro con CPU 10-core e GPU 16โ€‘core, 16GB RAM, 1TB SSD)


๐ŸŽค Rode NTG4+ Shotgun Microphone


๐Ÿชต IOTXY Solid Wood Writing Desk


๐Ÿช‘ IWMH Ergonomic Office Chair

๐Ÿ“ฆ๐Ÿ“ฆ๐Ÿ“ฆ๐Ÿ“ฆ๐Ÿ“ฆ๐Ÿ“ฆ๐Ÿ“ฆ๐Ÿ“ฆ๐Ÿ“ฆ๐Ÿ“ฆ๐Ÿ“ฆ๐Ÿ“ฆ๐Ÿ“ฆ๐Ÿ“ฆ๐Ÿ“ฆ



00:00 Previously
00:48 Today
01:00 Running live-server
01:26 Fixing letter issue left from other video
01:48 Adjustments on the code
06:07 Adding highScore div
07:04 highScore logic
10:02 Adding averageScore & epochNumber div
11:01 epochNumber & averageScore logic
12:10 Coding Reinforcement Learning AI class
15:07 RLSnake.checkDirections()
24:26 RLSnake.calculateState()
24:42 RLSnake.update()
25:04 RLSnake.reward()
28:20 RLSnake.getQ()
28:47 RLSnake.setQ()
29:20 RLSnake.getAction()
32:25 RLSnake.implementAction()
34:08 Creating an instance of RLSnake
35:09 Handling some errors
36:05 Detecting some issues
38:13 It works!
39:10 Creating gamma and alpha inputs
42:57 Results when alpha=0.1 and gamma=0.1
44:05 Results when alpha=0.2 and gamma=0.2
44:45 Endless loop when we set gamma=0.5
46:15 Results when alpha=0.2 and gamma=0.1
47:34 Realizing a huge mistake
48:30 It works like a charm
49:19 Watching in slow motion (we got highest score)
50:10 Testing with various values

ะŸะพั…ะพะถะธะต ะฒะธะดะตะพ

ะ”ะพะฑะฐะฒะปะตะฝะพ: 55 ะณะพะด.
ะ”ะพะฑะฐะฒะธะป:
  © 2019-2021
  ASMR Programming - Coding Snake A.I. - No Talking - RusLar.Me