Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 188 189 [190] 191 192

Author Topic: Dwarf Therapist (LATEST 0.6.12 5/23/12 see first post)  (Read 870314 times)

Parhelion

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (LATEST 0.6.12 5/23/12 see first post)
« Reply #2835 on: February 10, 2013, 07:10:03 pm »

EDITED:  The issue described below was resolved after I created another user account on my PC.  My original was an Administrator, so it wasn't an access issue.  My next question would be if Dwarf Therapist requires the creation of registry keys, which is an issue I have had in the past with the computer.

------

I am cross-posting this from the Masterwork thread, since I'm still not entirely sure which dev team would be most likely to know what's going on here --

When I attempt to run the copy of Dwarf Therapist bundled with the current version of Masterwork (alpha 2f), I get a "DwarfTherapist.exe has stopped working" error the moment after the screen for it pops up.  This occurs regardless of whether DF is running or where the exe is placed.  I also rebooted my PC (because turning it off and on again is the best IT advice I've ever given).

When I attempt a version of Dwarf Therapist (Version 0.6.12 - Branch 16.1) that was bundled with an older copy of Masterwork, it runs as expected.

The following is the log from D Therapist:


Code: [Select]
2013-Feb-10 18:06:12.327 INFO core Dwarf Therapist "0.6.12" starting normally. [src\dwarftherapist.cpp:123] (setup_logging)
2013-Feb-10 18:06:12.463 INFO core Loaded 8 views from disk [src\viewmanager.cpp:139] (reload_views)
2013-Feb-10 18:06:12.464 DEBUG core group_by now set to 0 [src\models\dwarfmodel.cpp:766] (set_group_by)
2013-Feb-10 18:06:12.468 DEBUG core group_by now set to 0 [src\models\dwarfmodel.cpp:766] (set_group_by)
2013-Feb-10 18:06:12.468 DEBUG core "redrew views in 5ms" [src\viewmanager.cpp:259] (draw_views)
2013-Feb-10 18:06:12.477 DEBUG core setting up connections for MainWindow [src\mainwindow.cpp:141] (MainWindow)
2013-Feb-10 18:06:12.480 DEBUG core group_by now set to 1 [src\models\dwarfmodel.cpp:766] (set_group_by)
2013-Feb-10 18:06:12.480 DEBUG core group_by now set to 1 [src\models\dwarfmodel.cpp:766] (set_group_by)
2013-Feb-10 18:06:12.481 DEBUG core beginning to read settings [src\dwarftherapist.cpp:145] (read_settings)
2013-Feb-10 18:06:12.515 DEBUG core finished reading settings [src\dwarftherapist.cpp:201] (read_settings)
2013-Feb-10 18:06:12.559 DEBUG core attempting connection to running DF game [src\mainwindow.cpp:263] (connect_to_df)
2013-Feb-10 18:06:12.563 DEBUG core adding valid layout "v0.34.11 (graphics)" "0x4fcc9488" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.564 DEBUG core adding valid layout "v0.34.10 (graphics)" "0x4fba073a" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.565 DEBUG core adding valid layout "v0.34.09 (graphics)" "0x4fb4c506" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.566 DEBUG core adding valid layout "v0.34.08 (graphics)" "0x4fb0ccba" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.566 DEBUG core adding valid layout "v0.34.07 (legacy)" "0x4f7592fe" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.567 DEBUG core adding valid layout "v0.34.07 (graphics)" "0x4f7592fe" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.567 DEBUG core adding valid layout "v0.34.06 (legacy)" "0x4f6c279c" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.568 DEBUG core adding valid layout "v0.34.06 (graphics)" "0x4f6c34ca" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.569 DEBUG core adding valid layout "v0.34.05 (legacy)" "0x4f55e19c" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.569 DEBUG core adding valid layout "v0.34.05 (graphics)" "0x4f55f23e" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.570 DEBUG core adding valid layout "v0.34.04 (legacy)" "0x4f4d8635" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.570 DEBUG core adding valid layout "v0.34.04 (graphics)" "0x4f4d9726" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.571 DEBUG core adding valid layout "v0.34.03 (legacy)" "0x4f4cd85b" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.571 DEBUG core adding valid layout "v0.34.03 (legacy)" "0x4f4cd85b" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.572 DEBUG core adding valid layout "v0.34.02 (legacy)" "0x4f3f76bf" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.572 DEBUG core adding valid layout "v0.34.02 (graphics)" "0x4f3f88bc" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.573 DEBUG core adding valid layout "v0.34.01 (legacy)" "0x4f390718" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.573 DEBUG core adding valid layout "v0.34.01 (graphics)" "0x4f391a33" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.574 DEBUG core adding valid layout "v0.31.25 (legacy)" "0x4d9068da" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.574 DEBUG core adding valid layout "v0.31.25 (graphics)" "0x4d90764f" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.575 DEBUG core adding valid layout "v0.31.24 (legacy)" "0x4d8f2994" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.575 DEBUG core adding valid layout "v0.31.24 (graphics)" "0x4d8f39f9" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.575 DEBUG core adding valid layout "v0.31.23 (legacy)" "0x4d8dd5a2" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.576 DEBUG core adding valid layout "v0.31.23 (graphics)" "0x4d8de854" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.576 DEBUG core adding valid layout "v0.31.22 (legacy)" "0x4d8b1dce" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.577 DEBUG core adding valid layout "v0.31.22 (graphics)" "0x4d8b30fc" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.577 DEBUG core adding valid layout "v0.31.21 (legacy)" "0x4d743206" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.578 DEBUG core adding valid layout "v0.31.21 (graphics)" "0x4d743da7" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.578 DEBUG core adding valid layout "v0.31.20 (legacy)" "0x4d72f10d" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.579 DEBUG core adding valid layout "v0.31.20 (graphics)" "0x4d734fb5" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.579 DEBUG core adding valid layout "v0.31.19 (legacy)" "0x4d5b9f3c" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.580 DEBUG core adding valid layout "v0.31.19 (graphics)" "0x4d5bc345" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.580 DEBUG core adding valid layout "v0.31.18 (legacy)" "0x4ce278c2" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.580 DEBUG core adding valid layout "v0.31.18 (graphics)" "0x4ce2841d" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.581 DEBUG core adding valid layout "v0.31.17 (legacy)" "0x4cdc0c76" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.581 DEBUG core adding valid layout "v0.31.17 (graphics)" "0x4cdc27a0" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.582 DEBUG core adding valid layout "v0.31.16 (legacy)" "0x4ca9c859" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.582 DEBUG core adding valid layout "v0.31.16 (graphics)" "0x4ca9d544" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.583 DEBUG core adding valid layout "v0.31.15 (legacy)" "0x4ca859cd" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.583 DEBUG core adding valid layout "v0.31.15 (graphics)" "0x4ca869ea" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.583 DEBUG core adding valid layout "v0.31.14 (legacy)" "0x4c9b4c27" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.584 DEBUG core adding valid layout "v0.31.14 (graphics)" "0x4c9b6efb" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.584 DEBUG core adding valid layout "v0.31.13 (legacy)" "0x4c908b66" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.584 DEBUG core adding valid layout "v0.31.13 (graphics)" "0x4c90ada8" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.585 DEBUG core adding valid layout "v0.31.12 (legacy)" "0x4c4c1527" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.585 DEBUG core adding valid layout "v0.31.12 (graphics)" "0x4c4c32e7" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.586 DEBUG core adding valid layout "v0.31.11 (legacy)" "0x4c495d9f" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.586 DEBUG core adding valid layout "v0.31.11 (graphics)" "0x4c496d93" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.586 DEBUG core adding valid layout "v0.31.10 (legacy)" "0x4c397516" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.587 DEBUG core adding valid layout "v0.31.10 (graphics)" "0x4c398089" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.587 DEBUG core adding valid layout "v0.31.08 (legacy)" "0x4c1d60a0" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.588 DEBUG core adding valid layout "v0.31.08 (graphics)" "0x4c1d69fe" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.588 DEBUG core adding valid layout "v0.31.06 (legacy)" "0x4c0f6a01" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.589 DEBUG core adding valid layout "v0.31.06 (graphics)" "0x4c0f83d5" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.589 DEBUG core adding valid layout "v0.31.05 (legacy)" "0x4c090730" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.589 DEBUG core adding valid layout "v0.31.05 (graphics)" "0x4c091569" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.590 DEBUG core adding valid layout "v0.31.04 (legacy)" "0x4befdde5" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.590 DEBUG core adding valid layout "v0.31.04 (graphics)" "0x4bf014fa" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.590 DEBUG core adding valid layout "v0.31.03" "0x4bc3c470" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.591 DEBUG core adding valid layout "v0.31.02" "0x4bbdf378" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.591 DEBUG core adding valid layout "v0.31.01" "0x4bb45f99" [src\dfinstance.cpp:111] (DFInstance)
2013-Feb-10 18:06:12.591 DEBUG core attempting to find running copy of DF by window handle [src\dfinstancewindows.cpp:191] (find_running_copy)
2013-Feb-10 18:06:12.591 DEBUG core found copy with HWND:  0x3033a [src\dfinstancewindows.cpp:207] (find_running_copy)
2013-Feb-10 18:06:12.591 DEBUG core PID of process is:  2052 [src\dfinstancewindows.cpp:214] (find_running_copy)
2013-Feb-10 18:06:12.591 DEBUG core PROC HANDLE: 0x560 [src\dfinstancewindows.cpp:222] (find_running_copy)
2013-Feb-10 18:06:12.591 DEBUG core PEB is at:  0xfffde000 [src\dfinstancewindows.cpp:228] (find_running_copy)
2013-Feb-10 18:06:12.591 DEBUG core read 12 bytes BASE ADDR is at:  0xdc0000 [src\dfinstancewindows.cpp:241] (find_running_copy)
2013-Feb-10 18:06:12.592 DEBUG core Target EXE was compiled at  "2012-06-04T05:57:12" [src\dfinstancewindows.cpp:70] (calculate_checksum)
2013-Feb-10 18:06:12.592 DEBUG core DF's checksum is: "0x4fcc9488" [src\dfinstance.cpp:1254] (get_memory_layout)
2013-Feb-10 18:06:12.592 INFO core Detected Dwarf Fortress version "v0.34.11 (graphics)" using MemoryLayout from "C:/Users/Sarah/Desktop/DwarfTherapist/etc/memory_layouts/windows/v0.34.11_graphics.ini" [src\dfinstance.cpp:1266] (get_memory_layout)
2013-Feb-10 18:06:12.592 DEBUG core base address: "0x00dc0000" [src\dfinstancewindows.cpp:263] (find_running_copy)
2013-Feb-10 18:06:12.592 DEBUG core memory correction: "0x009c0000" [src\dfinstancewindows.cpp:264] (find_running_copy)
2013-Feb-10 18:06:12.598 DEBUG core MEMORY SEGMENT SUMMARY: accepted 844 rejected 298 total 1142 [src\dfinstancewindows.cpp:370] (map_virtual_memory)
2013-Feb-10 18:06:12.598 DEBUG core GetModuleFileNameEx returned:  "C:\Users\Sarah\Desktop\MasterworkDF 2f\Dwarf Fortress\Dwarf Fortress.exe" [src\dfinstancewindows.cpp:277] (find_running_copy)
2013-Feb-10 18:06:12.598 INFO core Dwarf fortress path: "C:/Users/Sarah/Desktop/MasterworkDF 2f/Dwarf Fortress" [src\dfinstancewindows.cpp:280] (find_running_copy)
2013-Feb-10 18:06:12.602 DEBUG core Connection to DF version "v0.34.11 (graphics)" established. [src\mainwindow.cpp:322] (connect_to_df)
2013-Feb-10 18:06:12.607 DEBUG core MEMORY SEGMENT SUMMARY: accepted 844 rejected 298 total 1142 [src\dfinstancewindows.cpp:370] (map_virtual_memory)
2013-Feb-10 18:06:12.607 DEBUG core Loading language translation tables [src\languages.cpp:53] (load_data)
2013-Feb-10 18:06:12.607 DEBUG core Loading generic strings from 222e8e0 [src\languages.cpp:67] (load_data)
2013-Feb-10 18:06:12.607 DEBUG core generic words 0 [src\languages.cpp:69] (load_data)
2013-Feb-10 18:06:12.645 INFO core Loaded 8 views from disk [src\viewmanager.cpp:139] (reload_views)
2013-Feb-10 18:06:12.651 DEBUG core MEMORY SEGMENT SUMMARY: accepted 844 rejected 298 total 1142 [src\dfinstancewindows.cpp:370] (map_virtual_memory)
2013-Feb-10 18:06:12.651 DEBUG core loading creatures from  "0x021ea988" "0x0182a988" (UNCORRECTED) [src\dfinstance.cpp:372] (load_dwarves)
2013-Feb-10 18:06:12.651 DEBUG core dwarf race index "0x02016ffc" "0x01656ffc" (UNCORRECTED) [src\dfinstance.cpp:374] (load_dwarves)
2013-Feb-10 18:06:12.651 DEBUG core current year "0x01a1d32c" "0x0105d32c" (UNCORRECTED) [src\dfinstance.cpp:376] (load_dwarves)
2013-Feb-10 18:06:12.651 DEBUG core civilization id: "0x00000000" [src\dfinstance.cpp:382] (load_dwarves)
2013-Feb-10 18:06:12.651 DEBUG core dwarf race: "0x00000000" [src\dfinstance.cpp:386] (load_dwarves)
2013-Feb-10 18:06:12.651 DEBUG core current year: 0 [src\dfinstance.cpp:389] (load_dwarves)
2013-Feb-10 18:06:12.651 DEBUG core no active units (embark) using full unit list [src\dfinstance.cpp:788] (get_creatures)
« Last Edit: February 10, 2013, 07:18:26 pm by Parhelion »
Logged

splinterz

  • Bay Watcher
    • View Profile
    • Dwarf Therapist Branch
Re: Dwarf Therapist (LATEST 0.6.12 5/23/12 see first post)
« Reply #2836 on: February 11, 2013, 02:16:51 am »

EDITED:  The issue described below was resolved after I created another user account on my PC.  My original was an Administrator, so it wasn't an access issue.  My next question would be if Dwarf Therapist requires the creation of registry keys, which is an issue I have had in the past with the computer.

------

I am cross-posting this from the Masterwork thread, since I'm still not entirely sure which dev team would be most likely to know what's going on here --

When I attempt to run the copy of Dwarf Therapist bundled with the current version of Masterwork (alpha 2f), I get a "DwarfTherapist.exe has stopped working" error the moment after the screen for it pops up.  This occurs regardless of whether DF is running or where the exe is placed.  I also rebooted my PC (because turning it off and on again is the best IT advice I've ever given).

When I attempt a version of Dwarf Therapist (Version 0.6.12 - Branch 16.1) that was bundled with an older copy of Masterwork, it runs as expected.

The following is the log from D Therapist:
Spoiler: log file (click to show/hide)
no there aren't any registry keys written by DT. try renaming your Dwarf Therapist.ini file (users\your_username_here\appdata\roaming\udp software\dwarf therapist.ini) and run DT.

if that works, then there's a problem in the ini file, which is probably the case as creating a new user account resolved the issue. i've encountered this issue once recently and it was caused by the [window] section in the ini file being corrupted or something, so you can try removing that in the original ini file and see if that resolves the issue as well.
« Last Edit: February 11, 2013, 02:23:49 am by splinterz »
Logged

Maklak

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (LATEST 0.6.12 5/23/12 see first post)
« Reply #2837 on: February 12, 2013, 03:25:49 pm »

Sigh, I'll look at this again, but I'm so fed up with our arguments that my head hurts. That's why I took a long break.

> im pretty sure your wrong. [Estimating Thistleknot's function return value]
A miscalculation on my part? Let me see.

What about the other extreme, (CTI == 1) ? The correct return value is max. Sim3 returns max -1 or similar.
gap = (max - curr) * 500 / CTI
normalised_gap = 0.5 - 250 / CTI           // There was an error here and it propagated.
normalised_gap = 0.5 / (0.5 + 250/CTI)
normalised_gap = 1 / (1 + 500/CTI)
add_value = (max - curr) * (500 / CTI) * 1 / (1 + 500/CTI)
For small CTI that's slightly below (max-curr)
mod_Att_Value is slightly below max.
Yes, I admit, that this edge value is correct.

> btw. we did a simple fix for values over or at max. we just returm current.
Good. Small things like this tend to lead to bugs. The code you provided also lacks things like capping cap at 5000, capping the CTI at 1, checking if current attribute value is positive. You know, the sanity checks.

> the problem with all this code, is we need to figure it out, because Splinterz is on the cusp of his next release, and you keep getting my formula wrong...  dogging it and all is frustrating when your saying incorrect things about it.
Sigh. Well, yes, I admit, I should have spent some time playing around with it and making graphs. I just like it less than sim3 on principle; in my experience current value of attributes is what matters most. 

> so it makes it harder for Splinterz to figure out what goes into v20.
Yeah, about that. I get into heated discussions with Thistleknot. I'm often right, but also sometimes wrong. There is some bad emotional fallout from that and it is counter-productive to make Dwarf Therapist better. Sorry about that, Splinterz.

> This all started because I want to feed the values back into the bins (which I now firmly believe can be done safely)
I seem to fail to make a thought leap here. On one side you have your bins that try to approximate attribute distribution and map it to probability of value this or smaller. On the other side there are methods to factor in current value of an attribute as well as it's max value and CTI. I fail to see how to connect them. I'm not saying there is no connections, just that I lack an epiphany here.

I think the "normal" values for CTI would be 100 to 2000, even for mods. 1 CTI or less is a really abnormal case. The 1/x function behaves nicely enough where x is within an order of magnitude from 1. In other words, you may be somewhat off from what a human would pick, but the order will be correct at least.


Looking at the code:
> In sim3: //default_cti could be a weighted average of all cti's.
Personally I'd leave it at 500, but as long as you're using the same value the same attribute for all castes, you should be good.

> if(att >= 5000) return 5000;
Well, for such stellar attributes there should probably be a bonus (for example to roles), but this is quite rare, even with modding in "Strength potions" and similar interactions. If values above 5000 would screw something up on a higher level, this is fine.

//att_sim is based on median possible gain, not sure if it should be based on average possible gain, or median possible gain, or max possible gain
Any of the above will work, but I really had "expected average gain for this attribute over a few years" in mind.

> However, you seem to be quite aloof to reading about things you have an understanding of.
I have some degree of mathematical intuition, but in this case the output of both functions looks similar. I should have made some graphs before bashing what you did.
It may be that I understand exactly what I did, but fail to see the logic behind what you did. To me it looks as if you fiddled with formulas at random and got something that worked.

> > BTW, in case you didn't notice this yourself, your graphs for sim3 had 2 intervals where they were linear: before the cap and after the cap.
> Link, please.
Well, there wasn't one. And come to think of it, this is untrue. If sim_gain after factoring in CTI won't cap, then you the function basically returns (curr + sim_gain /2). After it caps, the return value becomes ((cap-curr)*(curr + cap)/2 + (sim_gain -(cap-curr))*cap) / sim_gain, so as sim_gain increases, the return value changes at the speed of (1 + x)/x, which isn't linear.

> I don't want you thinking I'm hating on you, I'm just trying to figure this shit out.  If we can't implement it without not knowing how it works, it's like magic to us.
I've already explained the trapezoid method. I guess to explain it again, I'd need a drawing. Here, I made one. Sim3 computes the average value of an attribute as it trains by att_sim. To do that, you can make a loop that goes on for 2000 or so times or use a smart method. The field of trapezoid is h*(a + b)/2 (or you can think of it as a sum of arithmethic series: (b-a) * (a+b)/2, same thing really). The field of a rectangle is b*c. You add the fields under the graph (as if computing an integral), then divide it by att_sim to get the average value. The slope before capping is always 45 degrees and att_sim is the only thing that depends on CTI. To compute the average value of a function over some interval, you calculate the surface area between the "x" axis and the function graph, then divide that by the length of the interval. I don't think, I can put this in simpler terms.


> so I think we're hitting on the same things, maybe you can explain SUPER LAMEN terms how what I conjured compares with yours (I know you don't owe us that, but if you present it, then Splinterz will understand, and be that much better to make his decision on v20!).
Lol, the problem here is that I understand exactly how my method works, but your formulas look magic to me. Still, the output is pretty similar.

Since you were kind enough to provide me with some source code, I guess, I'll go ahead and make some graphs of my own. Yours are jumping all over the place. Man, I got rusty with gnuplot and Matlab. I guess, I'll just use Open Office Calc. I only made any meaningful changes to the main function to give it a loop changing either att or CTI and print the values to a csv. 


The first graph was made by taking Starting Attribute for [450:950:1150:1250:1350:1550:2250], computing cap from that and using CTI of 500. Up to attribute value 1250 the cap is 1250 + att and after that it becomes 2*att. At that point the slope changes very little for sim3, while the change is greater for your function. For sim3 the current attribute value is much more important, while your function values the cap more. 


For the second graph I kept the attribute value at 1250, the cap at 2500 and manipulated the CTI from 50 (ten times faster gain) to 2000 (four times slower gain). For fast attribute gain the cap is more important, while for slow gain the current attribute value wins and both functions got that right. It is just that sim3 looks much smoother and "prettier", while your has some kind of irregularity around 500 (where it it most important to get things right). In retrospect, maybe I should have used a logarithmic scale for CTI here.

All in all I still prefer sim3, but the difference is not as great as I expected and both methods will get the job done.

EDIT: > Just out of mild curiosity: What are you (maklak), thistleknot and to some extend, splinterz, trying to do with this?  I saw long posts by all three of you for pages without end.
I think this is about a method for taking attribute values, then mapping them to <0, 100> for the purpose of factoring that into suggestions of roles for Dwarves. Not sure.
« Last Edit: February 12, 2013, 05:25:15 pm by Maklak »
Logged
Quote from: Omnicega
Since you seem to criticize most things harsher than concentrated acid, I'll take that as a compliment.
On mining Organics
Military guide for FoE mod.
Research: Crossbow with axe and shield.
Dropbox referral

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Dwarf Therapist (LATEST 0.6.12 5/23/12 see first post)
« Reply #2838 on: February 12, 2013, 03:35:09 pm »

Just out of mild curiosity: What are you (maklak), thistleknot and to some extend, splinterz, trying to do with this?  I saw long posts by all three of you for pages without end...
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

splinterz

  • Bay Watcher
    • View Profile
    • Dwarf Therapist Branch
Re: Dwarf Therapist (LATEST 0.6.12 5/23/12 see first post)
« Reply #2839 on: February 12, 2013, 04:32:55 pm »

Just out of mild curiosity: What are you (maklak), thistleknot and to some extend, splinterz, trying to do with this?  I saw long posts by all three of you for pages without end...
Maklak is correct in what he answered in his edit in the last post. currently role calculations just take into account the attribute's value. the idea was to see if there was a way to incorporate both the cost to improve an attribute, and a creature's maximum attainable value into the role's rating system for attributes. to put it bluntly, i wanted to know if there was a way to value a dwarf with very fast attribute gain, or a high potential attribute value in addition to the raw value.

since i'm terrible at the maths, i'd hoped that Maklak and thistleknot would reach an agreed upon solution to this problem, which after following the results i believe they have. it's not a huge deal for the roles, but it adds an extra level of depth and accuracy that some users may appreciate.

on a side note, are you still having problems toggling the labors?

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Dwarf Therapist (LATEST 0.6.12 5/23/12 see first post)
« Reply #2840 on: February 12, 2013, 04:36:11 pm »

Thanks...

About the labors: I did download 19.3 (I was running 19.1 before) but have not yet have the time to play or test.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

smakemupagus

  • Bay Watcher
  • [CANOPENDOORS]
    • View Profile
Re: Dwarf Therapist (LATEST 0.6.12 5/23/12 see first post)
« Reply #2841 on: February 12, 2013, 04:41:58 pm »

Don't attributes train really slowly? I can see why an advanced user might say Oh I sort of care what their potential is, but then a very advanced user might say Who cares who will potentially be better in 35 years, both dwarfs will be dead by then ^^  I guess you guys are taking all that in to account, or trying your best to at least.

splinterz

  • Bay Watcher
    • View Profile
    • Dwarf Therapist Branch
Re: Dwarf Therapist (LATEST 0.6.12 5/23/12 see first post)
« Reply #2842 on: February 12, 2013, 04:47:22 pm »

Don't attributes train really slowly? I can see why an advanced user might say Oh I sort of care what their potential is, but then a very advanced user might say Who cares who will potentially be better in 35 years, both dwarfs will be dead by then ^^  I guess you guys are taking all that in to account, or trying your best to at least.
it's pretty much for you modders. the default game rates are pretty slow and won't have an effect (for the cost to improve that is) since they're virtually all the same. the maximum values for each attribute change for each dwarf, so that can give a bit of a bonus. i'm adding in an option to choose a weight setting for this stuff like all the other role mechanics, so you have the option to ignore the potential rating entirely.

smakemupagus

  • Bay Watcher
  • [CANOPENDOORS]
    • View Profile
Re: Dwarf Therapist (LATEST 0.6.12 5/23/12 see first post)
« Reply #2843 on: February 12, 2013, 04:52:22 pm »

i'm adding in an option to choose a weight setting for this stuff like all the other role mechanics, so you have the option to ignore the potential rating entirely.

Sounds great!

.. The effort you're are putting in to this makes me want to think about mod in some school for learning rate boosting :D
« Last Edit: February 12, 2013, 04:54:34 pm by smakemupagus »
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Dwarf Therapist (LATEST 0.6.12 5/23/12 see first post)
« Reply #2844 on: February 12, 2013, 04:58:53 pm »

Learn rate boosting can only be done by transformation.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

smakemupagus

  • Bay Watcher
  • [CANOPENDOORS]
    • View Profile
Re: Dwarf Therapist (LATEST 0.6.12 5/23/12 see first post)
« Reply #2845 on: February 12, 2013, 04:59:45 pm »

Ahh, too bad :(
Sorry for mini-derail!

thistleknot

  • Bay Watcher
  • Escaped Normalized Spreadsheet Berserker
    • View Profile
Re: Dwarf Therapist (LATEST 0.6.12 5/23/12 see first post)
« Reply #2846 on: February 12, 2013, 05:05:52 pm »

mk. i noticed yours and my formulas graphed more similar when att_sim was 5000

btw mk. thats your formula im using. its from ur sim1 sim2 int code. its the interpolated formula

edit:
see http://pastebin.com/XAypc3Ka
skill_rate_eval
« Last Edit: February 12, 2013, 05:25:23 pm by thistleknot »
Logged

Maklak

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (LATEST 0.6.12 5/23/12 see first post)
« Reply #2847 on: February 12, 2013, 05:18:51 pm »

Quote
Don't attributes train really slowly? I can see why an advanced user might say Oh I sort of care what their potential is, but then a very advanced user might say Who cares who will potentially be better in 35 years.
I've brought this up already and it was discussed. My solution was to take a 10 year old fort and dump maximum gains and maximum rust for all Dwarves for each attributes to have a good estimate of what an average overseer might expect, then use similar values to simulate gaining attributes, which factors in current attribute value, cap and cost to improve. My proposal was shot down, but it looks like the counter-proposal will work too, just not as smoothly.

> Learn rate boosting can only be done by transformation. 
Yes, but I was thinking about castes rather than transformation; some mods already have some Dwarves who make great soldiers or administartors or masons. You can compliment that by giving both starting value and learning rate boosts for relevant attributes for those castes.

> mk. i noticed yours and my formulas graphed more similar when att_sim was 5000
5000 is too unrealistic and even 2000 is already on the high side. Even the soldiers usually gain "only" 1000-1500 within a few years. By setting att_sim to 5000 the cap becomes more important than the current value. This may be what you're aiming for, but I find using the current value to be more practical than the cap. Smaller att_sim makes the cap important if you're already close to it, but otherwise it's return value is based on the current attribute value.

> btw mk. thats your formula im using. its from ur sim1 sim2 int code. its the interpolated formula
It is similar. You've told me this already.

> ye but you said my formula was like magic to you... so i wasnt sure why u were saying that.
Well, I can't visualize the logic behind it and am quite surprised it works at all, but my graphs don't lie. By saying "this is like magic" I meant "I don't understand how and why this works". When I proposed it for skills, it was mapping distance to a shorter scale.
« Last Edit: February 13, 2013, 03:18:09 am by Maklak »
Logged
Quote from: Omnicega
Since you seem to criticize most things harsher than concentrated acid, I'll take that as a compliment.
On mining Organics
Military guide for FoE mod.
Research: Crossbow with axe and shield.
Dropbox referral

thistleknot

  • Bay Watcher
  • Escaped Normalized Spreadsheet Berserker
    • View Profile
Re: Dwarf Therapist (LATEST 0.6.12 5/23/12 see first post)
« Reply #2848 on: February 12, 2013, 05:46:14 pm »

mk.
ye but you said my formula was like magic to you... so i wasnt sure why u were saying that.

the problem with the logic of
Quote
> mk. i noticed yours and my formulas graphed more similar when att_sim was 5000
5000 is too unrealistic and even 2000 is already on the high side. Even the soldiers usually gain "only" 1000-1500 within a few years. By setting att_sim to 5000 the cap becomes more important than the current value. This may be what you're aiming for, but I find using the current value to be more practical than the cap. Smaller att_sim makes the cap important if you're already close to it, but otherwise it's return value is based on the current attribute value.

is this is for mod's, not just vanilla.  So it may be entirely possible for someone to train the full capacity of their potential.  Vanilla alone has shown danger rooms have a significant increase on skills/attributes in a short amount of time.  Using something like pumps exclusively for militia dwarfs could potentially allow a dwarf to hit his max strength in a few years.
see http://dwarffortresswiki.org/index.php/DF2012:Cross-training

Quote
For sim3 the current attribute value is much more important, while your function values the cap more. 

I found this weird since my results consistently reported lower values than yours.
update: i think this is only true at higher ctis when att_sim is 2000. see graph

On a side note, if you take my sheet (posted here http://www.bay12forums.com/smf/index.php?topic=66525.msg4012285#msg4012285) and use in place filters to filter by CTI, you'll notice that yours and mine spike around the same data points, but until you reach higher CTI's, your's cease to spike.  I found increasing the att_sim to 5000 retained the spiking nature.

Top compares att_sim of 5000 at 600 cti vs 50 CTI
bottom compares att_sim of 2000 at 600 cti vs 50 CTI

« Last Edit: February 13, 2013, 12:45:56 pm by thistleknot »
Logged

vrga

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (LATEST 0.6.12 5/23/12 see first post)
« Reply #2849 on: February 14, 2013, 01:30:33 pm »

to derail the current discussion which i honestly cant wrap my head around, the military role advisor is kinda missing... (in the military tab, the whole melee, ranged, blah, blah stuff)

if its related to what's currently being discussed, okay.

also, for brevity's sake, self-compiled DT v0.19.3 on linux.
Logged
Zeocin's take on the current situation in Ardentdikes:
Otherwise known as the Release Urist Now Apocalyptic Weapon of Arse Yerking, or the R.U.N.A.W.A.Y. system.
Pages: 1 ... 188 189 [190] 191 192