Page 1 of 1

A little technical here..

PostPosted: Tuesday, 29th November 2011, 11:07
by kuniqs
Question: does anybody know how to make a memory hack or something else which would allow me to read and write memory data of crawl process? I want to make an non-integrated automaton which would learn crawl and then win the game by itself with specified race/class combo.

Re: A little technical here..

PostPosted: Tuesday, 29th November 2011, 12:49
by varsovie
Under linux or windows, admin or user? Do you really want editing?

And why not simply using the lua binding as other bots : https://crawl.develz.org/tavern/viewtopic.php?f=22&t=2333 ?

Re: A little technical here..

PostPosted: Tuesday, 29th November 2011, 13:12
by kuniqs
Don't know Lua well enough to tell if implementing a neural net for that zotbot script would be possible. Additionally, making that thing in C would allow me to generalize it later for other uses, but still if anybody could post me a link to some kind of Crawl Lua documentation, I will be grateful.
I'm a Windows user. Either admin or user.

Re: A little technical here..

PostPosted: Tuesday, 29th November 2011, 13:52
by njvack
If you really want tight binding to Crawl's memory structures, you'd be better off compiling your bot as part of Crawl. Using a debugger or something would give you something bound to a particular version of Crawl, anyhow -- if memory structure lengths change, you'll be screwed.

The Zot Bot thread suggests that the Crawl Lua docs are effectively Crawl source -- see all of the l_*.cc files, especially l_you.cc.

You can definitely write your neural net in C or whatever (lua is not particularly fast; however, your neural net may not be huge) and call it from lua; see: http://gamedevgeek.com/tutorials/callin ... -from-lua/

Re: A little technical here..

PostPosted: Tuesday, 29th November 2011, 14:24
by varsovie
I'm used with gdb on Linux.
http://valgrind.org/ is nice too, but doesn't seem to be *nix only.
On windows you can try http://www.hex-rays.com/products/ida/index.shtml that has a demo version.
[url]OllyDbg[/url] has a nice Gui and lot of plug-ins.
Notepad++ with hex edit plug-in.
And you may need this library : http://msdn.microsoft.com/en-us/library/ms680553
But I do think that using an Hex editor and a disassembler isn't the easiest way.
Worse, if you don't know these tools yet, you may not understand a single line of assembly.
If you want to look and modify crawl's sources : https://gitorious.org/crawl/crawl.

Re: A little technical here..

PostPosted: Tuesday, 29th November 2011, 17:04
by Grimm
Topic moved to "Coding" section.

Re: A little technical here..

PostPosted: Tuesday, 29th November 2011, 19:58
by kuniqs
Lua thing seems nice, but I stiil can't find any l_you.cc or something, and the *.lua files don't seem to hold anything revelant. Where are those guys?

Re: A little technical here..

PostPosted: Monday, 5th December 2011, 14:55
by galehar
kuniqs wrote:Lua thing seems nice, but I stiil can't find any l_you.cc or something, and the *.lua files don't seem to hold anything revelant. Where are those guys?

You need to get the sources.