Return to “[Archived] Daily Dev Logs, 2012 - 2015”

Post

Week of August 11, 2013

#1
Sunday, August 11, 2013

Summary

Argggg I'm sorry, I reallyyyy didn't mean to spend the whole day on that stuff again :oops: But it ended up taking a lot longer to replace all the generic code than I expected. It's partly because I did a better job of upgrading the system than I anticipated. And also partly due to some horrendous template debugging sessions.

STILL. I promise it was worth the effort! Today alone I slashed hundreds of lines of overly-complex code with the improvements!! :D

Ok, tomorrow is seriously going to be more exciting, I promise...I'm DONE with this :D

(Yes, the game is compiling and running smoothly again, and no, the asteroids don't render appreciably faster. I REGRET NOTHING. :shifty: :shifty: )

[ You can visit devtime.ltheory.com for more detailed information on today's work. ]
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: Week of August 11, 2013

#2
Monday, August 12, 2013

Summary

Ok, yes, I did relevant work today instead of code-ripping!! Hooray!! :D

I started off by finally tending to an annoying artifact in the blurred environment maps (blurred versions of the nebulae which are used for reflections on metal as well as the "dusty background" inside asteroid fields). There was a very annoying artifact that allowed you to see ever-so-slight outlines of pixels, which totally blew the illusion because you could tell it was a cubemap :( But I fixed the blurring algorithm today, and to me it makes a really nice difference!!! That was driving me crazy for a long time. Dusty areas are more immersive now :)

And then, back to the simulation! Finished a few more of the abstraction operations today, but also think I finally figured out the solution to time-invariant "power" distribution among simultaneous events. This solution should prevent me from having to make everything undo-able, but should still allow the AI to reason about concurrent events. Nice ;)

>> WARNING: Conceptual Craziness Ahead <<

Speaking of undo-able. I started to have some crazy ideas today. I've been thinking for a while, that one of the really nice things about abstract objects is that you can create one, change it, and throw it away without any harm to the real thing. Sounds an awful lot like what we want to do in terms of hypothetical AI reasoning! I briefly considered this once before, a month or so ago: using "abstract differential wrappers" (like seriously, could he throw in some more random big words!?) that could track the changes to an object and then be thrown away when hypothetical time was finished. But what I never understood was: how to intercept calls to the object and route them through the wrapper without having to do a boatload of legwork to set up alllll of that indirection mess.

Today I had a pretty sweet idea. It dawned on me that every object knows a full list of people that are tracking it. This is a necessity, because when the object is destroyed, it needs to notify all of these people that it no longer exists. Well, hold on now. This sounds like something we can exploit. What if. We abuse this list to change all reference to the object to point to an abstract copy instead of the real thing!!!

Woah. Imagine it. You're writing game logic that deals with an object. But at any given moment, that object may become too far away to be stored in full detail, so the engine replaces it with a coarse version. Your pointer to it is automatically replaced, and it still looks, acts, and quacks like a real object, so your logic still works 100%. But you're now operating on a coarse object instead of the detailed one. And you don't ever even have to worry about it...it just happens! :D Furthermore, you don't have to track changes to objects and then roll them back during hypothetical reasoning. You just inject abstract versions of the objects that you want to modify (relocating all the references in the process), and then discard them when you're through!!

It's a strange and dangerous idea.

It may be the most elegant thing ever.

Or it may be a complete and total failure on every level.

Stay tuned to find out ;)

[ You can visit devtime.ltheory.com for more detailed information on today's work. ]
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: Week of August 11, 2013

#3
Tuesday, August 13, 2013

Summary

Excellent day! The biggest achievement was successfully implementing the fancy scheme mentioned in yesterday's dev log for automatically swapping out different versions of an object based on abstraction level. Though it seems a bit complex at first (and the implementation wasn't exactly the most friendly thing I've encountered this week), I'm actually feeling better and better about this idea. So much of the boilerplate stuff is removed. Game logic is once again 100% natural (never having to worry about differential rollback), yet can remain usable for hypothetical simulation. I have a really good feeling about this scheme ;) I think it's also pretty fast. No tracking of changes means all logic runs at full speed, both inside and outside the simulation. :thumbup:

>> Yep, you know the drill. Skip it or weep. <<

In the wee hours of this morning, I was feeling oddly-theoretical and also a bit grandiose, so I decided to read up a bit more on quantum mechanics and try to get just a slightly better grasp on what's actually going on in our world, and whether it is relevant to LT :geek: I can't shake the feeling that it's important in some way.

Well, the more I read, the more I became convinced of the surprising and infectious idea that "abstract simulation is just like quantum mechanical evolution." And yet again, maybe I have totally failed to understand the reality. But from my understanding, a quantum mechanical system evolves in time via a piece of logic (namely, a differential equation) that operates on a probabilistic state space. Not an actual state! So the universe is simulating not one thing, but an infinite space of them, each with some probability. Mind-blowing. Also exactly congruent to what the abstract simulation engine in LT does - but I never made that connection before.

Loosely-speaking, the engine keeps track only of vague pieces of information that can be used to construct a probability distribution over possible configurations of the world. In other words, in the abstract simulation, we never know exactly what the state of the world is, only some characteristics that describe that state. When it comes time for an object within this space to undergo "observation," the abstract probability distribution must be collapsed into a single, discrete state, just as the quantum wave function appears to collapse to a single state upon observation (ok, now I'm certain I got something wrong there :roll: ).

Maybe it means something, maybe not. But it helps me to understand simulation not in terms of "folding," as I have furtively called it before, but rather in terms of descriptions of state distributions. This, in turn, is going to help me understand the conversion from abstract to concrete! Under this interpretation, it's just sampling from a distribution. So the real trick, then, is to take an abstract description, then use it to compute the probability of a given state. If you can do that, you can at least use rejection sampling to build a concrete world that obeys the "wave function" of the abstract simulation results.

Look, I know I've gone off the deep end, and that's fine - I don't deny it. But I'm quite certain that I'll wash up on the shores of sanity soon. :monkey:

Soon.

PS ~ Seriously. I am under no illusions about how horribly I've brutalized the elegant field of physics. Please take nothing I say as fact :oops: The point is that this helps me to understand my own simulation architecture, even if it is based on a completely invalid understanding of QM :P

PPS ~ I swear the dev logs will be fun, lighthearted, and less nerdy again. Someday. Just not today. :shifty:

[ You can visit devtime.ltheory.com for more detailed information on today's work. ]
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: Week of August 11, 2013

#4
Wednesday, August 14, 2013

Summary

Ok, I'm back on the shore I think! Hoorayyy! No crazy talk today ;)

I implemented my "power" allocation scheme for events, pressed forward with the combat event, and am getting ohhhh so close to having a bonafied, hypothetically-reasoning AI.

I'm still missing just one or two critical pieces. The combat event in particular is complicated because it requires a response from all parties involved. So in your mind, when you're thinking about attacking someone, you need to take into account the fact that they're going to fight back. Naturally. But how do you do that? Surely you aren't running a full-blown simulation of the world in your head, including the person you're attacking. No, like the LT AI, you're probably running a highly-restricted simulation, involving only the relevant parties. You may envision the world around you, but you're not thinking about the fact that a flock of birds is flying overhead as you throw a punch at some guy who clicked the "taunt" button one too many times.

Hypothetical reasoning requires the ability to run a restricted simulation of the "relevant" pieces of information. For many cases this is a simple feat because it only involves you. I'll mine. I'll dock at that station. I'll use that wormhole. Who cares what anyone else is doing. But when you're talking about combat, suddenly another dynamic element gets involved, and you need to think about that.

I'm not 100% of the way towards understanding how to run the restricted simulation. I mean, I understand that it's basically a problem of traversing and running all elements of the world that are connected by the "edges" of an event. Sure. But the logistics of it...letting the person know that they are now involved in a "hypothetical" event, asking them how much power they will spend on it, reversing the whole thing when we're done, etc...just not totally there yet. Need more time :D

There, wasn't that a perfectly-civilized little dev log?? ;) :monkey:

[ You can visit devtime.ltheory.com for more detailed information on today's work. ]
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: Week of August 11, 2013

#5
Thursday, August 15, 2013

Summary

One of those days where the laptop just wouldn't do. No, today I needed the pen and paper. And coffee. Lots of it. :ugeek:

With those tools in hand, I successfully wrapped up the loose ends of events!! So many questions answered. So many realizations. A few of them:
  • An event is really the binding between objects. It tells you which objects are affecting one another. In this sense, a perfect "constrained simulation" is just a graph traversal, where the edges are defined by events.
  • Events are actually immutable. They should have no changing state! An event is code, not data. Similarly, the world should have no code, only data. An event does not keep state without a world, and a world does not change state without an event. (Beautiful in theory, that one's seriously going to be a pain to stick to..probably won't be able to, but it's a great guiding philosophy ;) )
  • An event has no owner, only a group of participants. In that sense an event can be driven forward by any of the participants. It's not necessary to know who is causing / reacting - only who is involved.
  • An event is always known to its participants, similarly, the participants are always known to the event. In this manner, logic always knows its scope of affect, and data always knows its sources of affect.
All of this has really helped me to understand the architecture, and I've made all of the necessary changes in the code to reflect this new understanding! Looks like we're about ready to rock and roll! :D

Full-speed ahead with AI reasoning now, let's see if we can get the AI to successfully use events to perform hypothetical reasoning to solve a goal! ;)

[ You can visit devtime.ltheory.com for more detailed information on today's work. ]
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: Week of August 11, 2013

#6
Friday, August 16, 2013

Summary

Solid progress on just about everything today ;)

Today the AI performed its first-ever successful goal -> idea -> action reasoning via the new abstract simulation engine!! Now, let's not get overly-excited. There wasn't a whole lot going on. I basically said "hey you, if you blow up that ship it'll make you feel better about yourself." For some reason the pilot believed me, so he said "hey, how can I make that ship go boom?" Then he noticed that he had weapons on his own ship. He also noticed that he was conveniently close to the other ship. Both of those things allowed him to recognize "pew pew" as a valid option :D From there, he imagined in his head what might happen if he were to go "pew pew." He saw the enemy fighting back, he saw his ship taking a few scratches, but, in the end, he saw himself winning. So he decided that he should attack.

And there you have it. Artificial intelligence. ;) :monkey:

Of course he wasn't actually able to attack, because the relationship between events and maneuvering strategies (the low-level AI implementations of actually doing things when the player is watching) is yet to be solidified. But the important stuff happened! An abstract simulation was run correctly, using abstract objects and rolling back the changes by destroying those objects afterwards, and a decision was correctly made to attack! Underneath the hood, that's really quite a bit of stuff going on :)

Probably the even cooler thing is that when I told the other pilot to attack, he......well....he didn't :o :shock: Ah, emergent behavior already!! I checked the logs to see what was going on, and, sure enough, this pilot walked through the same situation in his mind, but came to the (correct) conclusion that he was vastly outmatched, and decided that attacking really wasn't in his best interest. If more of the "details" of AI were implemented, this is probably the part where he would have contemplated requesting help, retreating, etc. But that's pretty cool that we're already seeing how the coupling between abstract sim and AI reasoning can provide an automatically-high level of accuracy with respect to reasoning! Keep in mind that this is the exact same logic that controls OOS simulation!! Zero redundancy :geek:

Well, I can't even remember how long ago it was that I had the whole "AI reasoning and OOS sim are the same thing" idea. Probably at least a few months..right?? Feels like ages. Yep, it took me ages to build an architecture that could actually realize that level of unification. But we're here, folks. And it feels mighty fine.

Mighty fine indeed.

:monkey:

[ You can visit devtime.ltheory.com for more detailed information on today's work. ]
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: Week of August 11, 2013

#7
Saturday, August 17, 2013

Summary

Some days you just can't stop the graphics. You know? Yep, in my heart I'm still a graphics programmer :cool:

Started off the day with some command interface fixing. It was in pretty bad shape (read: 110% broken) since I've been neglecting it. I brought it to about 75% working status today, which is good enough for the time being :D I can at least use it to view the world now. I'll worry about the rest once fleet gameplay is back in ;)

Using the command interface to roam around the world a bit revealed that the new dynamic asteroid system was suffering from some pretty bad performance problems. Performance problem you say? Sounds like fun :geek: So I broke out the old profiler and beat about 90% of the resource usage out of that system! Now I can navigate around a dense system with silky smoothness, which is pretty great when you consider how many objects are being loaded and unloaded as I move the camera at waaaay-faster-than-ship speeds (casual estimate: probably 100K objects passing in/out of the engine in one second!)

Great, but it's pretty annoying how planet atmospheres, wormholes, and generally anything with alpha blending shines right through the dust :oops: Kind of defeats the purpose of "exploration" in a dusty system...yes? Yes. Let's fix it. Done.

Speaking of dust, I improved the "fog" model while I was at it. One thing that really bothered me since the beginning is how the background can be seen "on top" of nearby objects that are slightly dusty. It looks unrealistic, but it seemed a necessary consequence of using the blurred environment map as the dust background. But. Today I came up with a new solution that still uses the blurred env map, so far-off space looks dusty and great, but nearby objects blend to a different fog model that looks much more realistic at closer ranges! :D

And finally, I improved the look of asteroids. You know. They're my love...so...gotta keep working on them until the day I die ;)

Well folks, the graphics are just looking better and better every month. I'm quite proud of this little engine :monkey:

[ You can visit devtime.ltheory.com for more detailed information on today's work. ]
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: Week of August 11, 2013

#8
Week Summary

General Sentiment

Another really great balance of conceptual and practical this week! We made some huge strides, probably the biggest of which was the automatic reference relocation for abstract objects. It just really simplified so much code, and totally blew away the need for the "differential rollback system," as described and implemented previously. For the first time this week, we finally saw all of this conceptual ballyhoo come together into the first practical result: an AI that uses abstract simulation to understand how "attacking" works, and accurately reason about the nature of attacks! All without any extra AI-boilerplate code :clap:

On the graphical side, the engine saw a lot of small improvements that added a wealth of beauty to the asteroid fields. Ahh you know how I love my asteroid fields ;)

I'm really proud of the balance that I'm achieving so far this month with respect to conceptual / practical. Seems like I'm managing to split time about 50/50 which is perfect, because it leads to big "unseen" advances under the hood, but still plenty of visible advances above the surface! :thumbup: Let's keep that up!! :D

Major Accomplishments
  • Implemented automatic reference relocation for abstract objects
  • Implemented power allocation for dealing with events
  • Finishsed the rest of the basic AI implementation
  • First-ever successful AI reasoning using abstract simulation!!
  • Improved lots of graphics related to asteroids and asteroid fields 8-)
  • Significantly improved performance of dynamic object streaming system (for asteroids)
  • Finished upgrading generic programming library, cut code all over the place
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford

Online Now

Users browsing this forum: No registered users and 1 guest

cron