tag:blogger.com,1999:blog-6923947282926324208.post2337127562843532358..comments2024-03-08T09:15:52.903+01:00Comments on Entropic and Fractal Intelligence: Beyond entropySergio Hernandezhttp://www.blogger.com/profile/18108694861191833007noreply@blogger.comBlogger11125tag:blogger.com,1999:blog-6923947282926324208.post-4413905422470151602014-05-14T18:14:58.090+02:002014-05-14T18:14:58.090+02:00Hi Andy, I didn't see your comment before! The...Hi Andy, I didn't see your comment before! The piece of code you are looking for is is UListOfFutures.pas, look for "spline" for instance as level 7 uses it and it is commented as "spline" in the code.<br /><br />But this level 7 is now deprecated, and a little too complicated to follow as spline formulaes are a little complex for the task.<br /><br />Instead I use now a "level 8" algortihm (you will find the code below the code for level 7 on the same .pas file) that uses a "sensitivity" of joystic, so the lower it is, the smaller "options" are checked: instead of using "rotate +/-5º" it uses "rotate +/-3º" if it detect that smaller options are getting higher scoring that "big" ones (I always try two sets of options for each free param, being the smaller 1/3 of the biggest).<br /><br />It works out much better than level 7 and is much simplier to program and to understand (you can visualize it by activating in the enus "Debug, Show levels". The 3 levels you will see correspond to Energy, Health and the third is the sensitivity of the main power free param. Sergio Hernandezhttps://www.blogger.com/profile/18108694861191833007noreply@blogger.comtag:blogger.com,1999:blog-6923947282926324208.post-90282538622081873132014-03-14T01:02:48.838+01:002014-03-14T01:02:48.838+01:00I've been going through you code. Would save m...I've been going through you code. Would save me some time to know where I should look for these calculations? Andyhttps://www.blogger.com/profile/16882084691355634515noreply@blogger.comtag:blogger.com,1999:blog-6923947282926324208.post-72503133243259943042014-03-14T01:00:12.283+01:002014-03-14T01:00:12.283+01:00I see. My mistake was to assume the speed is const...I see. My mistake was to assume the speed is constant. It is not because you are taking these force into account.Andyhttps://www.blogger.com/profile/16882084691355634515noreply@blogger.comtag:blogger.com,1999:blog-6923947282926324208.post-62521710267429110502014-03-14T00:33:16.817+01:002014-03-14T00:33:16.817+01:00When you turn the kart you are loosing some veloci...When you turn the kart you are loosing some velocity in order to give it to rotation, you loose something in the friction needed to change the course of the kart, so you end up having rotated more, but at the expense of running shorter.<br /><br />Just think at running in the higway, you are 140 km/h, then you turn the wheel totally left... what happends? sure you will not be still at 140 km/h in one minute from your decision!Sergio Hernandezhttps://www.blogger.com/profile/18108694861191833007noreply@blogger.comtag:blogger.com,1999:blog-6923947282926324208.post-84798619445460256462014-03-13T23:57:53.193+01:002014-03-13T23:57:53.193+01:00On the raced distance I seem to still be missing s...On the raced distance I seem to still be missing something.<br /><br />If we assume the speed remains constant and we use a fixed interval for each iteration:<br /><br />let speed = 1m / sec<br />let time = 0.1 sec (the length of a single iteration in the simulation)<br />Distance travelled = speed * time = 0.1 m<br />Num iterations = 5.0 sec / time = 50 iterations<br /><br />So you will iterate 50 times and travel 0.1m during each iteration. Which means you will travel 5m (0.1m X 50 iterations). Thus the path length is always 5m, no? <br /><br />Perhaps, I have misunderstood something?Andyhttps://www.blogger.com/profile/16882084691355634515noreply@blogger.comtag:blogger.com,1999:blog-6923947282926324208.post-58432645607098789542014-03-13T15:07:14.188+01:002014-03-13T15:07:14.188+01:001) No, you can drive in small circles or just stra...1) No, you can drive in small circles or just straight. First option raced small distances compared to second.<br /><br />2) While simulation kart moves, I check for the final position is inside or outside the track. If it get outside, I term,inate this future in this point, no more decision or simulations, so the reced distance, in my simulation, is "untill time ends of you get out of the track".<br /><br />Also, when a kart crashses with another in a future, both karts stop the futures. So, basically, any "disruptive" event can be used to set the kart to "dead" and it means all activity stops.<br /><br />If it happends while imagining a future, the future ends there. In "real life" (not imagining a future but really simulating the kart next move) those events can have an effect of decreasing health or similar (not implemented, but will be). Sergio Hernandezhttps://www.blogger.com/profile/18108694861191833007noreply@blogger.comtag:blogger.com,1999:blog-6923947282926324208.post-29954244638452380882014-03-13T15:00:40.408+01:002014-03-13T15:00:40.408+01:00Not exactly.
Step 1: You have an intial position,...Not exactly.<br /><br />Step 1: You have an intial position, then you decide to turn the driving wheel -5 degress, simulate a delta time, and you get into another position.<br /><br />Step 2: Take a random decision on turning the driving wheel between -5 and +5, simulate another delta time, and get a new position.<br /><br />Step 3: Repeat step 2 until delta times simulated reach 10 seconds.<br /><br />So you always decide on "pushing the joystick left or right", or "turn the wheels alittle more to the left or right", not on any real change of position of the kart.<br /><br />In the case of accelerate/brake you give or take a little of pressure on the pedals, and the simulation adjust it all.<br /><br />Once decided your "push", then you simulate: Sum the decided push of -5 -or random value- to the angle of the wheels, them simulate the physics for a delta time so the kart do move to a new position.<br /><br />Sergio Hernandezhttps://www.blogger.com/profile/18108694861191833007noreply@blogger.comtag:blogger.com,1999:blog-6923947282926324208.post-82002141302406752632014-03-13T14:41:11.567+01:002014-03-13T14:41:11.567+01:00Two other questions:
1. Assuming you only change ...Two other questions:<br /><br />1. Assuming you only change the heading during a random simulation and assuming there were no boundaries (i.e. open space, no walls) wouldn't the raced distance always be equal and thus the probability also be the same? <br /><br />2. Under what conditions does a simulated future terminate prematurely? I.e. How do we get shorter paths? running into a wall? others?Andyhttps://www.blogger.com/profile/16882084691355634515noreply@blogger.comtag:blogger.com,1999:blog-6923947282926324208.post-65332897402568662592014-03-13T00:43:03.167+01:002014-03-13T00:43:03.167+01:00Ok. It seems to be what I expected. Just to make s...Ok. It seems to be what I expected. Just to make sure...<br />Step 1: set your initial location = your present location minus 5 (if you are doing the -5 option)<br />Step 2: Simulate a random move between two extremes (e.g. -5 and 5) from the location in step 1.<br />Step 3: Update you current position = previous simulated position + random move<br />Step 4: Repeat starting at Step 2 until you have reached time goal (ex. 10s)Andyhttps://www.blogger.com/profile/16882084691355634515noreply@blogger.comtag:blogger.com,1999:blog-6923947282926324208.post-49275699156466949722014-03-12T17:34:19.866+01:002014-03-12T17:34:19.866+01:00You need a random drive, so in every frame, before...You need a random drive, so in every frame, before moving the kart "in your imagination", you need to redefine each of the free params values to sometihng random, so you need to repeat it for every little step you make while constructing the future.<br /><br />You then have 3 kind of "taking decision" cases:<br /><br />1) First frame on a future.<br /><br />Fisrst choose one of the free params of the system, then take one of the available option for this free param.<br /><br />In our example, you decide to decide on free param "turning left/right" (instead of accelerating/braking), and then choose between -15, -5, +5 or +15 turning options.<br /><br />2) Each subsequente step on this future.<br /><br />All free params take a random value between the two "smaller" options, -5 and +5.<br /> <br />3) And back to reality, the kart takes the intelligent decision.<br /><br />Here is when you score each option of each free param by summing scores of all its different futures, and then average so you get the "intelligent" decision for this free param. Repeat on all free params and you have a vector that represent the final intelligent decision, that would change one or all the free params.<br />Sergio Hernandezhttps://www.blogger.com/profile/18108694861191833007noreply@blogger.comtag:blogger.com,1999:blog-6923947282926324208.post-33978203916503617442014-03-12T14:32:33.854+01:002014-03-12T14:32:33.854+01:00Thanks for taking the time to write the pseudo cod...Thanks for taking the time to write the pseudo code out. One question. <br /><br />1.3.1) Take a random decision (value = -5 + random*(-5+5))<br />Is the -5 applied to each of the 100 iterations? Or is it just there for the initial position?<br />Andyhttps://www.blogger.com/profile/16882084691355634515noreply@blogger.com