Better HN
topnewbestaskshowjobs
Log inSign up

azimux

14 karma · joined Jun 9, 2014 (12y ago) · 1 submissions

Submissions

comment 1y ago · link · parent

I wrote an agent from scratch in Ruby several months back. Was fun!

These 4 lines wound up being the heart of it, which is surprisingly simple, conceptually.

        until mission_accomplished? or given_up? or killed?
          determine_next_command_and_inputs
          run_next_command
        end