A little technical here..


Questions, Explanations, Howtos

Crypt Cleanser

Posts: 724

Joined: Tuesday, 29th November 2011, 11:04

Post Tuesday, 29th November 2011, 11:07

A little technical here..

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.
"Damned, damned be the legions of the damned..."
User avatar

Crypt Cleanser

Posts: 645

Joined: Wednesday, 14th September 2011, 09:36

Location: <---

Post Tuesday, 29th November 2011, 12:49

Re: A little technical here..

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 ?

Crypt Cleanser

Posts: 724

Joined: Tuesday, 29th November 2011, 11:04

Post Tuesday, 29th November 2011, 13:12

Re: A little technical here..

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.
"Damned, damned be the legions of the damned..."
User avatar

Barkeep

Posts: 4435

Joined: Tuesday, 11th January 2011, 12:28

Post Tuesday, 29th November 2011, 13:52

Re: A little technical here..

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/
I am not a very good player. My mouth is a foul pit of LIES. KNOW THIS.
User avatar

Crypt Cleanser

Posts: 645

Joined: Wednesday, 14th September 2011, 09:36

Location: <---

Post Tuesday, 29th November 2011, 14:24

Re: A little technical here..

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.

Ziggurat Zagger

Posts: 6393

Joined: Friday, 17th December 2010, 18:17

Post Tuesday, 29th November 2011, 17:04

Re: A little technical here..

Topic moved to "Coding" section.

Crypt Cleanser

Posts: 724

Joined: Tuesday, 29th November 2011, 11:04

Post Tuesday, 29th November 2011, 19:58

Re: A little technical here..

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?
"Damned, damned be the legions of the damned..."
User avatar

Dungeon Master

Posts: 4031

Joined: Thursday, 16th December 2010, 20:37

Location: France

Post Monday, 5th December 2011, 14:55

Re: A little technical here..

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.
<+Grunt> You dereference an invalid pointer! Ouch! That really hurt! The game dies...

Return to Coding

Who is online

Users browsing this forum: No registered users and 10 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.