For the memory based hack that I was working on, I found an interesting way to detect where the entities are located in memory.
Normally you search for a static pointer, but in dota 2 it seems to be hidden multiple layers deep. So one option would be to use the pointer scanner, but that could take quite a while.
I found an alternative, which is to interpret the memory address of the HP + 420 ( in hex ) as a text/string . Each entity seems to have the same two characters at that location. It is usually something along the lines of a number followed by unicode character ( ex: 4↑ ). This changes each patch, but doesn't seem to change when you close the game and restart it.
---------------------------------------------------------------------------------------
However while browsing reddit I came across this:
https://www.reddit.com/r/DotA2/comments/4khufi/valve_can_we_have_a_mini_ai_tournament_for_ti6/d3fad3q
which points to a github project from "lightbringer" aka Tobias Mahlmann who also created Dotalys 2 (replay analyzer for dota 2).
https://github.com/lightbringer/dota2ai
It basically is the default dota 2 map edited with the Workshoptools from Dota 2. It uses a LUA script to send the game state of Dota 2 to a program, and that program sends commands (like attack,move etc) in JSON format back to the LUA script.
So I am going to halt my work on the memory based Dota 2 bot API for now and see if this LUA based solution can offer the functionality needed for a Dota 2 Bot API.