Thursday, September 29, 2011

Poster Art Final Draft


Our external artist is making good progress on the poster art. This is the final draft before she does the inking.

Wednesday, September 28, 2011


New Character Select UI stuff I was working on.

And an update...


Small updates

I made a few changes to Modeller to make it more pleasant, I've put the Dojo in the background and so it almost does look like a preview of how it will look in-game. I made a couple small changes to Sensei and I put together the Takeshi spritesheet. I'm probably going to do the Character Select UI now.

Tuesday, September 27, 2011

AI and UI Demonstration


She learns from what I do, and quickly discovers a killer tactic.

New UI

Two quick pics to add for the UI stuff I've been doing lately, the two most changed screens are the Main Menu and the in-game battle screen. Other screens have had some slight changes including using the new Sensei font but otherwise haven't been changed too much.
Modifications to the main menu include using the
new Sensei font, and cleaning up the menu items.
The menu here is clean and simple to use.

The in-game interface (top) was made. The health bars
themselves are still temporary.
The in-game UI is shiny.

Poster art

An artist's first quick sketch of our project poster.

So I'm commissioning an artist to do our Trade Show poster so it can have the attention it needs as a poster while I'm busy with other project work. Here's a first look at the poster image that I asked her to design: the Sensei in the back with the three fighters in the front; Catalina with a jump kick on the side, Takeshi in the middle with a karate stance, and Ivanov on the other side "looking menacing."

More as it comes!

Ivanov

Ivanov's always tricky because his arm overlapping his chest is hard to distinguish. I've put in some gradient shading to make that apparent here which hopefully doesn't look too odd. Again I'll wait for Vince's approval for this one.

Catalina

And now Catalina has a face. Hmm..
Again no shading, just want to get Vince's green light on these characters, if he wants the body shapes changed I can easily do that at this stage.

More game artwork.

A quickly put together version of the
final Takeshi Oshiro in-game character
Hi again. I've started working on game art now, and since Vince wants his hands on the final character's models so he can get to animating, I'm going to be making them now. In the last hour I put together this guy. I'm following references from Vince for the character look. Right now there's hardly any shading (just where I couldn't help myself and got carried away cause it looked cool :P) just so we can have the actual limbs created and see if it's what Vince wants. He can start animating and all that while I'm doing the shading and details, it will seamlessly integrate after that, so long as the base shape is the same.

I've also decided that I want outlines to be drawn in-game, like above, which makes them look cooler :)

Monday, September 26, 2011

Modeller v 1.0

Modeller now supports changing a bone's sprite during a motion, which brings Modeller to it's fully functional capabilities, so it's version 1.0 now.

Website Update

I redid the front "welcome" page of the website and changed up a few things. The online versions of the Technical Documentation and Project Plan documents are also up to date.

Now I will probably have a short break then work on UI graphics.

Tech Doc update to reflect new AI changes

Yup, this morning after finishing my other assignments I updated the Sensei Technical Documentation to reflect the new AI changes I've made recently. That involved adding in a section here and there and removing some sections, changing a diagram and rewording some stuff. I also took out the Pseudocode section... I just don't think it's necessary if we have a Code Snippets section as well. I doubt anyone will miss it.

Next on the list is updating the website, then I will probably get into working on Modeller and game art.

Sunday, September 25, 2011

More AI/DecisionSystem work

Today I did a fair bit of work making the AI and DecisionSystem behave more natural. The neural network now distinguishes between jump attacks and ground attacks. The DSState is now implemented to a decent degree so you can see the behaviour of the AI change depending on its mood. Blocking is more natural now, it doesn't just block as soon as you attack, it blocks when it thinks you might attack (pre-emptive!)

There are also a bunch of small changes and additions to Inferences and ShortTermMemory which were made so this could be done. It's getting there. :)

Friday, September 23, 2011

Today's work.

I did a fair bit on Sensei today, mainly between 4 and 9 pm. Here's what I did since the last post.

Worked on the neural network some more, improved the decision system in various ways, added a "global timer in use" warning (I want to abolish the use of these... they are error prone and ugly) and worked with Ryan on linking move information from the event manager with the decision system.

The new neural network system is working just fine. Next on my want-to-do list is making the AI act more human-like (sort of already started that, I've implemented blockAbility and delays between attacks) and fix up some UI stuff to make that more polished. It's lagging behind.

The New Neural Network.

After long deliberation, I have decided to revamp the AI's neural network implementation. There are a few main reasons:

  • Our "neural network" was only really one by namesake. It was a rigid model that externally behaved like a neural network but had virtually nothing else in common.
  • The Neural Network, Policies and Memories were getting a lot more complex than required and the maintenance required for those classes would become overwhelming.
  • The "neural network" was limited in the sense that it wasn't terribly exciting to watch.

So... I thought long and hard about what I could do. And I had to really think about how all the AI components fitted together and how each had their own separate task.

Conclusion: I will be rewriting it from scratch. It sounds like a big task but actually I'm reducing the size of the problem by making it simpler and more effective. I will not be scrapping DecisionSystem -- which, if you recall, actually does most of the legwork currently (the AI-specific stuff was only very early stage.) But instead of the neural network competing with the DecisionSystem, vying for the authority to make decisions for the AI (which is, in this context, by and large a qualitative problem not a quantitative one) the neural network is going to be applied to the AI's fighting style and preference towards certain moves (out of a pool of the moves it knows.) I am also going to be implementing this artificial neural network in a closer-to-standard way with neurones and weighted dendrites but it will still be slightly unconventional in its usage.

I'm not sure if neural networks have been used in this way before. Maybe it's a hybrid... But in this way, the problem is made simpler for the neural network as analysis of the output with respect to the effect on the world is not necessary. Only forward inputs (from the world) are required, and weights are adjusted on the fly based on those inputs. The neurons themselves only need to work in one mode and there is no need to calculate error derivatives such as required in the back-propagation algorithm.

In a sense I'm downgrading the goals of the neural network to something that makes more sense and it should work seamlessly. I've already begun the coding and it's going smoothly.

Learning will still be apparent and should actually be easier to demonstrate. This is done through the KnowledgeBank class as well as the NeuralNetwork (they are tightly coupled.)

Our main goals for the AI are to provide a computer-controlled player that improves over time with direct relation to its experiences and I believe this system will achieve that to a greater level of success.

Thursday, September 15, 2011

Multiple updates

So, where to begin? Haha. After merging Tech Doc information and updating that document as well as the Project Plan, I began to work more on the AI and DecisionSystem. I also quickly did up sound effects for the demonstration and we all put in a little effort to get it a bit more polished up for the demo.


Tonight I did a whole reel of bugfixes and improvements to multiple areas of the project from Bone Animation to screens to event management to the Fighting Engine. I added rumble to attacks. I also got the AI to block low moves as well as high moves, and some other stuff. Towards the end of the week (Thursday-Sunday) I will begin to work on AI learning but the focus for tonight was good demonstration material.

So, we have a working game more or less and two players can battle each other and have a match. :P

Monday, September 12, 2011

AI! Fighting Events! Demonstration!

So for the last few hours or so (time flies when you're making AI) I've been developing the AI and the DecisionSystem further. It still doesn't learn at all yet but it's getting there. Since we're doing a prototype demonstration this week, I'm going to have the AI running on defaults, stubs, and hardcoded hacks. It sounds bad but they're really just placeholders for the real deal -- learning, pattern recognition, skill proficiency, etc. Right now, as of the revision I just committed, the AI will block whenever it sees that it's under attack, and it will keep attacking you whenever it can. If it can't reach you, it will get close to you. So basically what we have here right now is a killing machine. Vince wanted me to commit it so he could try it out.

She's blocking my kick :( Click for full-view. :)

AI Brain and neural network.

Just a quick blog post before I rush off to my next class. Spend the last hour and a bit doing more AI stuff. More implementation of the neural network and further development on the policies and memories. At the moment there is a partially functioning policy system going on but there are no input memories so it isn't the full works and therefore doesn't do anything terribly exciting at present. However, it was interesting and so far everything's been going well and according to plan and the layers of abstraction all make sense. For example, well there are a lot of examples where the various pieces of the AI system are interdependent, but the brain is responsible for assigning costs to policy solutions. For example, who's to say that the diminishing distance between the two fighters is a positive result for the goal "GetCloser"? The brain (AIBrain) does that.

More later!

Sunday, September 11, 2011

I did a fair bit of work on the Tech Doc today, after a few hours of LISP (CSCI337.) I decided to create the following diagram which shows how the information flows from the Event Manager through various stages during the Controller (AI/COM) and DecisionSystem classes. 

How information in the fighting world goes through different stages for the
DecisionSystem and AI/COM classes to process; and how these forms relate.

I also continued the implementation of the AI system; currently working on the neural network: policies, memories, and integrating it with the host (AI) class.

Saturday, September 10, 2011

AI in-depth DFD

I needed to make this to make sure I didn't get lost in the AI system.

A more in-depth look at how the AI system works.
The fact that each one of these classes has a fair bit of work to do on its own it was a lot to keep in mind. But the abstraction is so far working great and I only have to think about what each little bit does at any one time, and as long as each part does what it's supposed to, it should all work ;P

AI Neural Network

So I've officially started the AI NeuralNetwork class. It all seems to make sense in my head based on the design of it but it will no doubt expand as we discover small cases where our needs redefine our designs. So far the NeuralNetwork is (meant to be) a container for the knowledge and memories of an AI brain. It also calculates and manipulates policies inside a PolicyMemory class which it uses to form the output. Essentially it is a wrapper around PolicyMemory since PolicyMemory just gives raw access to the neural network, it doesn't do any of the processing between the Brain and the data itself which is what the NeuralNetwork class will do (i.e. search for rules, filter, extract, update conditionally, etc.; all that ugly stuff we want to abstract.)

Friday, September 9, 2011

AI Reaction Time.

Turns out my hypothesis about AI reaction time in my post a few posts back works great. It took a few minutes to implement and test and it already makes the AI fighter look more natural.


Dojo parallax background

Took me about an hour and a half to paint up this dojo which is separated into 3 layers that scroll independently. The effect makes the scene a bit more natural and now we have a nice background to look at which isn't from Google Images.


UI tidying and some niceties

Here's a cool logo screen that's generated on-the-fly. You can watch it actually paint the logo.


I have more plans for this, either to go with that style and put it on a paper texture and make what you see here actually a stencil over a paint texture, and add some more stylish stuff (ink blots etc.) to make it more presentable, or do something else completely (like abstract lines that form into our logo or something?), but this will do for now. And there's no annoying JXEngine logo sound any more.. haha.

I also made the main menu neater with minor touches; also made the stage selection screen cooler and tidied up code for some of the screens.

I spent way too long on that logo, but it was fun writing a brush simulator right down to the ink viscosity on the varying-lengthed bristles. Probably could use help from a pre-made algorithm but if you know me I like to roll up stuff myself.

Thursday, September 8, 2011

Other dummy characters modelled.

Vince and I worked together to bring the other two characters to life with dummy models. Catalina and Ivanov can now be tested and seen instead of just red Takeshi's. Vince did a great job of putting the skeletons together and making the basic animations we're using for now, in a flash. Most of the work I did for Sensei since last update was organising and tech doc stuff (it's in the agenda) but I also made the AI attack you just because I can. It'll be something nice to show Luke.

Monday, September 5, 2011

AI hitch?

Alright so splitting up all the AI/COM common code into its own class was successful. Very much so. However I have been spending a little bit of time on a little problem. "Reaction time". It is a harder problem than it first seems. I tried twice, and ended up with two side-effects (which I kept there in case we do find a use for them): observation latency emulation, and controller latency simulation. Neither of which is functionally equivalent to reaction time. Why? Reaction time is non-symmetric. Let me illustrate...

Imagine you are a racing car waiting for the green light. Reaction time affects how long after the green light you actually start moving. However, it does not affect how long after the finish line you hit the brakes! It only affects the initial event. Now the reason this is tricky is movement events are generated once per frame. If I just keep them in a buffer (queue) with an x second delay, we get the effect of the guy walking and continuing to walk even past his goal (controller latency.) If instead I keep the world states in a buffer (queue) with an x second delay, we end up with a similar situation, except that he doesn't "see" anything that happens until x seconds later, and he doesn't realise he has gotten to his destination, so he again, overshoots.

Now what is the solution? Buffering events for a certain amount of time would most definitely be the way to delay things. But what do we buffer? That is the question I am trying to answer now. One potential solution is to buffer the worldstate for everything except myself (i.e. my fighter's state.) That has the effect of creating a worldstate which has me in the present, and everything else x seconds (or frames, which may work better for practical purposes) in the past. That is an inconsistent worldview, but is that a problem? I mean we are trying to introduce imperfection!

The question remains whether such a worldview is logically equivalent to reaction time. After writing up all this, which has made me think about it more (different cases and what side-effects this kind of buffer would cause for the AI,) it seems like what we want.

Maybe I'm thinking too much into the reaction time parameter. Perhaps for more human-like AI behaviour I should start coding in some of the subtleties in a fighting strategy algorithm such as standing ground, etc.

More from me later!

Code Surgery


So while cutting code today for the AIBrain class I realised that what I was writing was actually code that is common to both COM and AI-- decision making, crunching goals and making inferences. So I've decided that I want to restructure this a bit and put that common code into its own class, possibly named DecisionSystem. The thought had come up a long time ago (eureka!) but was sort of left in the documentation to rot and I forgot about it. So anyway I've rediscovered it and will be working on it. From there, the AIBrain will use the DecisionSystem in addition to its own learning and understanding system (dynamic) to, ultimately, generate the fighter's instructions. The COM will use the DecisionSystem and convert goals directly (more or less) into actions (static) to achieve the same end. So my task ahead involves some code surgery, but it should leave the classes neat and well structured and of course mean that there's less work for me to do (code reuse is a great time-saver.)
I think this way of doing things is the most ideal considering that now the AIBrain can now just store the AI-specific stuff, and the decision system can store the short-term memory, inferences, and all that stuff which is generated on the fly.
More updates tonight when I've done that :)
Oh, and I'll need to be updating the technical documentation somewhat (perhaps change up the diagrams a bit) to reflect these changes as well as others. No worries though, it's all in the plan -- Week 7 -- updating Tech manual to reflect changes.

Sunday, September 4, 2011

Weekend work

Today I did a lot of AI-based work, which involved methods in the AIBrain class for pulling information together, expanding the skeleton of the AI decision system and implementing simple brain goal and action management in the AI. Right now it doesn't do anything visibly different because the WorldState is not being filled by FightEngine and some RoundStates are not set properly; hence the AI is deaf and dumb. But it seems to work in theory (:

Also I drew the (temporary) spritesheets for the other two characters so we have some visuals to go on for the other two. They just need to be skeletonified and animated. I may leave that to Vince as he is the primary animator :)

Friday, September 2, 2011

Animation Blending


Motion Blending! And having fun over Skype while working on project :)

AI and COM progress

I've now implemented some more of the AI/COM structures as per the functional requirements. Two new structs were added, Personality and AIAttributes, to define the behaviour and identity of COM/AI opponents. I will now be working on building up the AI class and getting it into the game.

Animation Engine Goodies

Just working on the higher-level stuff in the Animation Engine. Since the fighting engine guys will be playing animations by their string name, there may be the case where they forgot or misspell an animation. So in a few minutes I put together a few more helper functions in the helper library, one of which is string Helpers.FindClosestString(string, IList<string). It uses the Levenshtein distance to find the closest string. When an animation isn't found by that specific name it throws a (usually) smart exception:

The animation 'eyerish jeeg' doesn't exist. Did you mean 'Irish Jig'?


Really loving LINQ stuff and other powerful tools like generics, lambda functions, etc.

Brand new Character Select Screen

As I said I would, I rewrote the core of the Character Select screen and now it works wonderfully with selectors and a SelectorManager...it functions just as you expect in all cases I've tried.


Thursday, September 1, 2011

Progress, work and more work

Alright so I've just done 3 assignments in the last few days, and I've been fairly busy but I've still been keeping things up to date with the project, making sure everyone knows what they're doing and has a pretty good idea of the path they're on. I'll be rewriting the core of the Character Select Screen to better reflect the final version tonight, as well as working on the implementation of the user-friendly AnimationEngine functionality, so that the Fighting Engine devs can interface to it properly.

I still have a short list of TODO's for the Character Modeller but they can wait for now. I've got another assignment I need to make a few tweaks to then I'll be working on Project flat out. I've gotta do the two other placeholder character models this week and I might have a go at some music sampling.