Saturday, March 24, 2007

Rabbit Mania

World display

Created a basic rabbit, and changed the display program so that it displays all animals in the grid. The rabbit right now eats it's fill for the day, and then moves to another location in the cell. I discovered that the energy going into the cells was too high. It was supporting over 14 rabbits and there was no degradation of the vitality in the cells. According to a quick estimate I should be supporting maybe 3 rabbits in this amount of area.

So the next step was to half the energy input into the cells. It fell rapidly in less than 2 years it went down to under half of the vitality. I've jumped up the energy to 75% of the original and reduced the rabbits to 5. Total vitality of the cells has slowly grown over 10 years.

I set up a cron job to run a shell script that executes about 1000 days at a time.

Next steps is the tune the energy levels, and make the rabbits more rabbit like.

Labels:

Wednesday, March 21, 2007

World Simulation: Rabbit

Drew a rabbit like icon and have it displaying. No data behind the image still working out the details of the data that will be needed. I started up a discussion in the forums.

Picking a rabbit seems to be a good choice of animals to pick. Lots of data and studies on these little critters. Found an article that confirms my simplified simulation seems to be going down the correct path. I can't read the full article, but the abstract gave me enough information on determining what my vitality figure for a cell represents and how to relate it to the rest.

Rabbits eat a lot over a year. I'm going to use the 1.7% as a base reference. I'm calculating that a rabbit consumes all net productivity of .0068 hectares. My little play pen is representing .01 hectares. Since this is not southern Ill, but my version of Eden. I should see less of an impact. Even so this .01 hectares could only support 3 rabbits at most before there is a gradual degradation of the cell.

Found some other links that gave ranges of food pellets in grams that a rabbit can consume in an average day. It comes out to between 25-50 grams per kilo per day. I figure that an average grassy plot of 10 sq meters may contain between 5-10 pounds of grass. Thats 1270-2540 grams of grass. Since those are pellets and pellets contain cereal grains in them and no water. A rabbit would eat maybe twice as much in unprocessed food. Just from what I have put together I'm getting between 20 and 30 cells to support a rabbit. It looks that I might be estimating high on the grass weight or underestimating the consumption needs of a rabbit.

Labels:

Converted Weather Perl script over to PHP

display

Since I had the weather script working, I wanted to take the time and convert it over to PHP before going into more elaborate work. I’ll start to break out segments of the program into separate files. It should make maintenance easier. The conversion worked on the first try. The differences in syntax between Perl and PHP are not that great. The big difference is in the random number generator. My first pass at looking for examples on random number generation for PHP found only an integer generator. No big deal. Place a max range and divide by max rand and I get a real number between 0 and 1.

It appears that less energy is being passed through with this random generator. I’ll run through several tests. And make some adjustments.

The php script might be slower, or it’s speed decline could be caused by the web server or going over the network. Doesn’t really matter, as the scripts start to get finalized, parts of it will be changing over to database procedures and packages.

Labels:

Tuesday, March 20, 2007

Weather update

Think I have a stable weather distribution, Just sunny days or rainy days. 20% chance for rainy, otherwise it's sunny. Rain adds 25% moister to the soil and a random between 0 and 1 added for vitality. Sunny reduces moister by 10% and adds vitality random between 0 and 1. If moister goes below 0% then deduct 1 from vitality.

Ran the first simulation with everything set to zero. It took about 650 days to get most of the cells up to a green level of vitality. (between 75 and 100)
This shows that there is enough energy going into the simulation to support the basic land unit and have the vitality increase over time.

I've added a day counter to the display to show the age of the simulation.

Here's the link to the display: Display


I've set up a forum section for discussions on ideas or general discussion about building a model. Link

Labels:

Monday, March 19, 2007

World simulation

One of the ideas, I've had churning in my head for years have been to develop a world simulation. This simulation would contain a self-sustaining eco-system. The eco-system would have basic food-chain systems that function all the way up to having humanoid forms.

Where to start? Well I need to start with a piece of land.

This will be my basic land unit. The world will be made up of a basic land unit. So what kind of traits will this piece of land contain? All eco systems are based on energy. Our source of energy is sunlight; sunlight has two effects heat, and provides plants with the required energy for photosynthesis. The other main ingredient is water.

The fluctuation of the energy being imparted onto a piece of land is weather. The goal is to create weather that leaves the land in a perpetual state of Eden. For me Eden is around 75 degrees Fahrenheit for the high and enough rain every few days to keep everything green.

I’m going to take a shortcut and make the assumption that every land piece is covered by grass. This combination of Land and Grass will be my vitality value.

The following is a list of the data elements that I have identified as being needed.

land_id
grid_number
cell_number
land_type
vitality
soil_moister
water_level

The first 3 are elements that will be used to identify where the piece of land is located. I’m going with a single land element = cell. A grid contains a 10 x 10 grouping of cells. As things grow I will use an area = a 10 x 10 grouping of grids. If a cell is equal to 10 x 10 meters then an area will be equal to a square kilometer. The grid and areas will help keep track of events that impact a large group of cells, or if events cause persistant lingering effects that need to be tracked.

Here is a link of the visual display of my first sample grid. Right now instead of a grid effect of the weather each cell will have its own weather event.

http://www.4rca.com/cgi-bin/world/display.php

Labels:

Thursday, March 08, 2007

Scanning logs files today

Was going through my daily ritual of looking at the web servers log files and found these entries in the /var/log/secure. There were several attempts from this IP address. The usual stuff.

Mar 8 05:50:18 localhost sshd[20017]: Failed password for root from ::ffff:12.149.67.178 port 34463 ssh2
Mar 8 05:50:21 localhost sshd[20019]: Failed password for root from ::ffff:12.149.67.178 port 34733 ssh2
Mar 8 05:50:25 localhost sshd[20021]: Failed password for root from ::ffff:12.149.67.178 port 34997 ssh2
Mar 8 05:50:28 localhost sshd[20023]: Failed password for root from ::ffff:12.149.67.178 port 35257 ssh2

Let see who owns the IP address.

Pasted the info into Arin who’s who to see who it is.

AT&T WorldNet Services ATT (NET-12-0-0-0-1)

12.0.0.0 - 12.255.255.255

AMERICAN CHECK MANAGEMENT AMERICAN53-67-160 (NET-12-149-67-160-1) 
                                  12.149.67.160 - 12.149.67.191

Not much information, but it is American based so I’ll try and notify. I did a search on American Check Management and found this article.

I wonder if they will be happy with the hosting service if has ended up compromising financial data.

Labels: