[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Fwd: Please Forward: Ruby Quiz Submission

James Gray

10/16/2006 1:20:00 PM

Begin forwarded message:

> From: Edward <edward@ethelred.org>
> Date: October 16, 2006 3:23:30 AM CDT
> To: submission@rubyquiz.com
> Subject: Please Forward: Ruby Quiz Submission
> Reply-To: edward@ethelred.org
>
> Hi,
> Here is my submission for Ruby Quiz 98. I'm not sure how well the
> backtracking works in this version, I might think about that some
> more.
>
> cheers
> Edward Harman
>
> class TileType
> attr_reader :cost
> attr_reader :sym
> def initialize(sym, cost)
> @cost = cost
> @sym = sym
> end
> def passable?
> cost > 0
> end
> def newTile(x, y)
> Tile.new(x, y, self)
> end
> end
>
> class StartTileType < TileType
> def newTile(x, y)
> $start = Tile.new(x, y, self)
> end
> end
>
> class GoalTileType < TileType
> def newTile(x, y)
> $goal = Tile.new(x, y, self)
> end
> end
>
> TYPES = {
> '@' => StartTileType.new('@', 1),
> '.' => TileType.new('.', 1),
> 'X' => GoalTileType.new('X', 1),
> '~' => TileType.new('~', 0),
> '*' => TileType.new('*', 2),
> '^' => TileType.new('^', 3)
> }
>
> POINTS = [
> [-1, -1], [-1, 0], [-1, 1],
> [0, -1], [0, 1],
> [1, -1], [1, 0], [1, 1]
> ]
>
> class Tile
> attr_reader :x, :y
> def initialize(x, y, type)
> @x = x
> @y = y
> @type = type
> end
> def distance(goal)
> (@x - goal.x).abs + (@y - goal.y).abs
> end
> def cost(goal)
> distance(goal) + @type.cost
> end
> def passable?
> @type.passable?
> end
> def sym
> @type.sym
> end
> end
>
> class Map
> def initialize(mapstring)
> @map = []
> @height = 0
> mapstring.split.each_with_index do |line, y|
> @width = line.size
> @height += 1
> line.split("").each_with_index do |c, x|
> @map << TYPES[c].newTile(x, y)
> end
> end
> end
> def get(x, y)
> if(x >= 0 && x < @width && y >= 0 && y < @height)
> @map[x + @width * y]
> end
> end
> def adjacent(t)
> result = []
> POINTS.each do |dx, dy|
> test = get(t.x + dx, t.y + dy)
> result << test if test
> end
> result
> end
> def find_route
> @route = [$start]
> @current = $start
> checked = []
> bad = []
> while(@current != $goal)
> #find adjacent tiles
> choices = adjacent(@current).select{|t| t.passable? && !
> (checked.flatten + bad + @route).include?(t)}
> if(choices.size == 0)
> ##need to backtrack
> bad.push @current
> @current = @route.pop
> checked.pop
> else
> #sort by cost
> choices = choices.sort_by{|t| t.cost($goal)}
> checked.push choices
> #take lowest
> @current = choices.shift
> @route.push @current
> end
> end
> @route
> end
> def tile_to_s(t)
> if(@route && @route.include?(t))
> '#'
> else
> t.sym
> end
> end
> def print
> line = ""
> @map.each_with_index do |t, i|
> if(i > 0 && (i % @width ==0))
> puts line
> line = ""
> end
> line << tile_to_s(t)
> end
> puts line
> end
> end
>
> TESTMAP = <<-ENDTEST
> @*^^^
> ~~*~.
> **...
> ^..*~
> ~~*~X
> ENDTEST
>
> map = Map.new TESTMAP
> map.print
> puts ""
> map.find_route
> map.print
>
> LARGEMAP = <<-ENDLARGE
> @^.^~****^*~~.~^~..~~~^~.^~.*~**.^^*^*^~..*^^..~^.
> *.*~*.~^^^~~.*~*.**.~~^*^**.^~*^^.*^...^..^.**.~^*
> ^^***~.*^*^..^**.~~~.~*.~^^~^~^.^~^*~**.~*^.^**.*.
> *~~.~^.~*~^~^^*^**.~.*^^*~~^^*~.^.*^^*^.^.~~^^^*~.
> *.^~^^.~^.^.^^*~^~~*^..^~^~~^.*^^..**.**~.~~^~*~**
> ^.^^~^.*~**.*~*^*~^*~~^.^.~.~^**~.^^^^*.~.~~~^^.^.
> *~~.*.^~~~^*.^*~~~*^.^**^*^.^.^~~***^^*^.~^^.^^.~.
> .~.*~~^*.**.~^^~**^.^.^~~~^.~.^~~^^.~^^.^^~.~.~.*^
> .^^^~~*~.^.~.*~.~~..~*~^.~**~..^****~.*~^~~*~**^~^
> ^^^*^^**...*.^^*^^^.*~*~^^~*~~.~****~~~~***.^^~~^~
> ..*^^^^^.^~.^~.^.^^~*~^*~**^*^.~~~*^.^^~**~*~.....
> **.^~~~^~*~****.**^~.^.*^^^~.^...~.**^^^^~^.~^~.~*
> ^*~.*.~*^.~.^^^^^*~.**~^.*^*.~~..^~~~*~*^.~~^*^*^^
> ~*^.^..**~**^*^~***^~~*^*.*~..~^^***^.*~.^*^^^^.~.
> *~^~^**^^*^^~^*~^^*~~~*^*~~~~*~^^^*~..~~~~~.*~^~*.
> ^.*.^*^**^^^~**.*.~^~~~^..~~~*~~^*~..^^.^~*.^~^~**
> .***^..*^~~~~^~.*^~~.*.~^.^^*.***^~^.*....~.^.*~^^
> ^^~~~~.**.*.^^*.^~~^....*~*^~*^^.^~~~^*.~^^^~**^~~
> ^~~*^*.~.*^^^*^.*..~*...~**^.^^~.^^.^..^.^**.^^..*
> ~^***~^.~.~^^^*~~~.*..^~^^.~^.~.**...~^~**~^~~**^~
> ~~~^~.^*.^*.~*.*~~^..~*^^~~**.*.*.~^^^..^.~^.*.^~~
> ^^~...^.*~.^^**~^~*..^~^~*....^.^^**~.*.^^*..~*~.*
> ^..^...~.~.*.~***~*~~*..~*~^^~~^~**^~~^*^^~*.~*^*^
> *^.**^~*****.~~~..~^~.*.^*~^.^^*^..*~^.^.^*.^.~^^*
> ~...~*^....*^.*^^*...^.~~..^.*~.*~.*^.^*^*^.****^~
> ^..~***^.*^~~.****.~*^.~.^~*.~^*^~^.****~..~*..*^~
> .~^~**~^^..~~~^..*~*.^**~..^^*.~.*..*~~*~.^~.~*~~.
> .***~..~**^.~.~.~*.~~**..^.^~..~*~~~~*.**~~^..^.^^
> ~.*.~^*^*~^.~*..*~^~~.*.*..*.*..^~.*~^^*.~^.^~^**^
> .*^~^^*.^*.~*...*~~~*.**.~...*.*^.^*.^*~*.^~^**^*.
> .~..*....~..~.***~..~^..~~^*^*^~^^~~**^.*~**^**^^*
> ^.*.~.^.**^*^.~^^*.~..*^~*^***.~**..^.~~*..^*^~*.~
> ^~~^~~*.~^^~~^**.^.^^^*^.*^^~~.^.*~^*^^..**..**..^
> ^.^*.*^..*.~~.^^***^.*~..~.**^*.~^...^^~*.~^~^..~~
> ~^^.^..*^^.**.~~^*~*^~*~^~~.~*.^~.~*^~*.*..^.^^*^*
> ^^.~*^~~*.~~*~.^..~*.^.~**.^*^.^~.**.~*.~...~~..*.
> .~..^.~.~.^*.~^*~.~.*^*~~*.^.******~*~~*^~~~^.~~*~
> ~.*..^^*^~*.~~.~.^~..~.~^^^.*~*.**~^*~*^*^^~..^~^^
> *.^*^**^*.^^*....**..~^^~.^*^.*~*^**^^..*.^^*^^^.~
> ^*^~^^*.~*~^*~^~~.*.^*^~*^^~.*~.*~.**.*~^~~.~*^~~*
> ~~**~*.^.*~..~~^^^~^^^.~***^*.^*~^*~^~*~**...~..~.
> *~**^~~.^.*.~^**~*^^.*^*.^~~*~~~*^.*..~~^*^.*^.^.*
> .*^~..*~.*^^^^^~~^^*.~*.~~~.***~^.*..~~******~~^*.
> .^^..^.^*^~^.~*...**~~~.**^*~~~*^***~^*^~^~~^^^*.*
> **.**~.**~.*.*^~~.~^.*^.~~*.^*.~.***~*^^..~*.~*^*^
> ~..^.****^.****~^~***..^^^^*^.~*^^*.~~.^**^*~^*.~~
> ^*~^.~*...^^.^~.^^..~^...**...^****^*~*~*^..~^*~.~
> ...^~^.~^^~~~~.*^~.^~***~~^^^.*^^.~.^*~*~**^***^~^
> .~~~~~^^.~~*^.~^^^**~^~.^~^~*..^*~^^*..*~^~**.*.^.
> ~^**.~**..*^~^^^.^*^~^~*^.~*~.^.**.^.^^.~**^~~^~^X
> ENDLARGE
>
> map = Map.new LARGEMAP
> map.print
> puts ""
> map.find_route
> map.print
>
>


13 Answers

Daniel Martin

10/16/2006 2:18:00 PM

0

James Edward Gray II <james@grayproductions.net> writes:

> Begin forwarded message:
>
>> From: Edward <edward@ethelred.org>
>> Date: October 16, 2006 3:23:30 AM CDT
>> To: submission@rubyquiz.com
>> Subject: Please Forward: Ruby Quiz Submission
>> Reply-To: edward@ethelred.org
>>
>> Hi,
>> Here is my submission for Ruby Quiz 98. I'm not sure how well the
>> backtracking works in this version, I might think about that some
>> more.
>>
>> cheers
>> Edward Harman

When I try this solution on the map I've been trying all the solutions
on, this happens:

@.*..
..~..
..^.X

#.*..
..~..
..###

That is, not only does it try to go over the mountain, it manages to
jump a square, jumping straight from the start at (0,0) to the
mountain at (2,2).

The culprit for going over the mountain instead of going through the
forest is almost certainly the manhattan distance, as it is in other
solutions. I have no idea why it jumps a square.

--
s=%q( Daniel Martin -- martin@snowplow.org
puts "s=%q(#{s})",s.map{|i|i}[1] )
puts "s=%q(#{s})",s.map{|i|i}[1]

J A

9/20/2008 8:36:00 PM

0


"Tiglath" <ycmiyc@gmail.com> wrote in message
news:22fbbd75-8d39-4a1e-b003-2c49f79c5f7e@k37g2000hsf.googlegroups.com...

===
I never understood how more troops would stop violence unless they
were stationed permanently in every household. They effected a
retreat as when the husband comes home on the MILF, but it doesn't end
the affair.

Patraeus tried some new clever methods, which HELPED, but in not way
lead to conclusive victory. We are STILL STUCK there.

I always knew that Bush had one more big fuckup before he left office,
and without the help of Bin Laden.

Hence, The Splurge.

How nice must it be to fill up your off-shore accounts for a rainy
day, then max out all your credit cards and tell the world you have a
crushing debt on your chest and wake up the next day and as if magic,
it's gone.

The RICH guys in Wall Street have no more debt, Bush has transferred
it to Main Street.

When the anesthetic wears off and runs out over the political season
you will see the pain of increasing our debt with that of those New
York fuckers.

Governance starts in oneself. If you have a system that allows
people to get exploding mortgages, they will, because the American
people are mostly dumb; at least half of them, they vote for a guy
who'd have a beer with, and just love Alaskan fluff with trendy
glasses, but live within their means (which in America means - not to
borrow more than you can pay), that they cannot do. Therefore, good
governance demands that the opportunity of reckless borrowing does not
exist.

I am not complaining, having missed on the .com bubble, I bought a
large house in 02 and sold it in early 06 for almost double, and in
the next two years it's going to be heaven to buy nice bank-owned
properties. It's close to money for nothing, and the chicks for
free.

I see lots of houses languishing in the market. You call for the
price, cackle at the answer and call a month later, and you see the
learning process people with exploding mortgages are going through.

The Splurge is going to be bad for the dollar. This is a good time
to buy Euros.
===

I've been out of US stocks for a long time (I think they still have about
another 20 pct to drop), but I do have money in T bonds (and Tbills).

What I'm thinking about is that in international banking circles, there has
previously been talk of the US needing an IMF/World Bank inspection, like we
have fallen to the level of Argentina or Italy (thank Bush Republicans).

So, is the stage set for US T bonds being lowered from their assumed "risk
free rating", by the massive addition to the USG of commitments to deal with
this debacle of essentially unknown depths?

I'll probably stay in T bonds since the T bill rates are down to nothing,
but I know there could be a hit coming in that market, too.

I think this coming election could be different from others.

Internationally, in the circles that count, it may be looked at as a sign as
to whether the US just went off on a negative aberration for the last 8
years, or whether something more or less permanent has gone wrong.

The US has never been perfect, but it has been thought of as preminent in
the world for many decades. We may be living through one of those periods of
a large fundamental change, that will have a lot of subtle and fundamental
results.






On Sep 20, 12:52 pm, "J A" <a...@re.com> wrote:
> http://www.jua...
> Saturday, September 20, 2008
> Sunni Baghdad Dark on Satellite;
>
> Satellite imaging that shows Sunni Arab neighborhoods in Baghdad dark
> gives
> evidence that the ethnic cleansing of the Sunnis by Shiite militias
> accounts
> for the fall in violence in Baghdad, not the extra troops Bush sent,
> called
> the 'surge.'
>
> 'Night light in neighborhoods populated primarily by embattled Sunni
> residents declined dramatically just before the February 2007 surge and
> never returned, suggesting that ethnic cleansing by rival Shiites may have
> been largely responsible for the decrease in violence for which the U.S.
> military has claimed credit, the team reports in a new study based on
> publicly available satellite imagery. "Essentially, our interpretation is
> that violence has declined in Baghdad because of intercommunal violence
> that
> reached a climax as the surge was beginning," said lead author John Agnew,
> a
> UCLA professor of geography and authority on ethnic conflict. "By the
> launch
> of the surge, many of the targets of conflict had either been killed or
> fled
> the country, and they turned off the lights when they left." The
> night-light
> signature in four other large Iraqi cities ? Kirkuk, Mosul, Tikrit and
> Karbala ? held steady or increased between the spring of 2006 and the
> winter
> of 2007, the UCLA team found. None of these cities were targets of the
> surge. Baghdad's decreases were centered in the southwestern Sunni
> strongholds of East and West Rashid, where the light signature dropped 57
> percent and 80 percent, respectively, during the same period.'



Andrew Swallow

9/20/2008 11:14:00 PM

0

Tiglath wrote:
>
> I never understood how more troops would stop violence unless they
> were stationed permanently in every household. They effected a
> retreat as when the husband comes home on the MILF, but it doesn't end
> the affair.
>
> Patraeus tried some new clever methods, which HELPED, but in not way
> lead to conclusive victory. We are STILL STUCK there.
>
> I always knew that Bush had one more big fuckup before he left office,
> and without the help of Bin Laden.
>
> Hence, The Splurge.
>
> How nice must it be to fill up your off-shore accounts for a rainy
> day, then max out all your credit cards and tell the world you have a
> crushing debt on your chest and wake up the next day and as if magic,
> it's gone.
>
> The RICH guys in Wall Street have no more debt, Bush has transferred
> it to Main Street.
>
> When the anesthetic wears off and runs out over the political season
> you will see the pain of increasing our debt with that of those New
> York fuckers.
>
> Governance starts in oneself. If you have a system that allows
> people to get exploding mortgages, they will, because the American
> people are mostly dumb; at least half of them, they vote for a guy
> who'd have a beer with, and just love Alaskan fluff with trendy
> glasses, but live within their means (which in America means - not to
> borrow more than you can pay), that they cannot do. Therefore, good
> governance demands that the opportunity of reckless borrowing does not
> exist.
>
> I am not complaining, having missed on the .com bubble, I bought a
> large house in 02 and sold it in early 06 for almost double, and in
> the next two years it's going to be heaven to buy nice bank-owned
> properties. It's close to money for nothing, and the chicks for
> free.
>
> I see lots of houses languishing in the market. You call for the
> price, cackle at the answer and call a month later, and you see the
> learning process people with exploding mortgages are going through.
>
> The Splurge is going to be bad for the dollar. This is a good time
> to buy Euros.

Becarful on that one. Europe is frequently a year behind the USA.

Andrew Swallow

Jason

9/21/2008 2:33:00 PM

0

Pretty much every book I have studied on counter-insurgencies suggest
that more troops in the area decreases violence. These troops need to
be out doing things and not sitting on a firebase doing nothing.


On Sep 20, 11:55 am, Tiglath <ycm...@gmail.com> wrote:
> I never understood how more troops would stop violence unless they
> were stationed permanently in every household.    They effected a
> retreat as when the husband comes home on the MILF, but it doesn't end
> the affair.
>
> Patraeus tried some new clever methods, which HELPED, but in not way
> lead to conclusive victory.   We are STILL STUCK there.
>
> I always knew that Bush had one more big fuckup before he left office,
> and without the help of Bin Laden.
>
> Hence, The Splurge.
>
> How nice must it be to fill up your off-shore accounts for a rainy
> day, then max out all your credit cards and tell the world you have a
> crushing debt on your chest and wake up the next day and as if magic,
> it's gone.
>
> The RICH guys in Wall Street have no more debt, Bush has transferred
> it to Main Street.
>
> When the anesthetic wears off and runs out over the political season
> you will see the pain of increasing our debt with that of those New
> York fuckers.
>
> Governance starts in oneself.   If you have a system that allows
> people to get exploding mortgages, they will, because the American
> people are mostly dumb; at least half of them, they vote for a guy
> who'd have a beer with, and just love Alaskan fluff with trendy
> glasses, but live within their means (which in America means - not to
> borrow more than you can pay), that they cannot do.   Therefore, good
> governance demands that the opportunity of reckless borrowing does not
> exist.
>
> I am not complaining,  having missed on the .com bubble, I bought a
> large house in 02 and sold it in early 06 for almost double, and in
> the next two years it's going to be heaven to buy nice bank-owned
> properties.   It's close to money for nothing, and the chicks for
> free.
>
> I see lots of houses languishing in the market.   You call for the
> price, cackle at the answer and call a month later, and you see the
> learning process people with exploding mortgages are going through.
>
> The Splurge is going to be bad for the dollar.   This is a good time
> to buy Euros.
>
> On Sep 20, 12:52 pm, "J A" <a...@re.com> wrote:
>
> >http://www.jua...
> > Saturday, September 20, 2008
> > Sunni Baghdad Dark on Satellite;
>
> > Satellite imaging that shows Sunni Arab neighborhoods in Baghdad dark gives
> > evidence that the ethnic cleansing of the Sunnis by Shiite militias accounts
> > for the fall in violence in Baghdad, not the extra troops Bush sent, called
> > the 'surge.'
>
> >   'Night light in neighborhoods populated primarily by embattled Sunni
> > residents declined dramatically just before the February 2007 surge and
> > never returned, suggesting that ethnic cleansing by rival Shiites may have
> > been largely responsible for the decrease in violence for which the U.S.
> > military has claimed credit, the team reports in a new study based on
> > publicly available satellite imagery. "Essentially, our interpretation is
> > that violence has declined in Baghdad because of intercommunal violence that
> > reached a climax as the surge was beginning," said lead author John Agnew, a
> > UCLA professor of geography and authority on ethnic conflict. "By the launch
> > of the surge, many of the targets of conflict had either been killed or fled
> > the country, and they turned off the lights when they left." The night-light
> > signature in four other large Iraqi cities — Kirkuk, Mosul, Tikrit and
> > Karbala — held steady or increased between the spring of 2006 and the winter
> > of 2007, the UCLA team found. None of these cities were targets of the
> > surge. Baghdad's decreases were centered in the southwestern Sunni
> > strongholds of East and West Rashid, where the light signature dropped 57
> > percent and 80 percent, respectively, during the same period.'

John Briggs

9/21/2008 2:38:00 PM

0

Jason wrote:
> Pretty much every book I have studied on counter-insurgencies suggest
> that more troops in the area decreases violence. These troops need to
> be out doing things and not sitting on a firebase doing nothing.

You know, in theory there's no difference between theory and practice - but
in practice, there is :-)
--
John Briggs

La N

9/21/2008 4:54:00 PM

0


"Jason" <elcyberlobo@gmail.com> wrote in message
news:70c2f85b-7f4f-4a9d-a98f-8e92ab2f9666@v16g2000prc.googlegroups.com...
Pretty much every book I have studied on counter-insurgencies suggest
that more troops in the area decreases violence. These troops need to
be out doing things and not sitting on a firebase doing nothing.


***************************

Hi, Jason, good to see you again!

Anyway, what should these troops need "to be out doing"? To keep this on
topic for the naval group, wouldn't that be a specialized task, a la Navy
SEALS or other special ops groups? I mean, you can't just go out shooting
willy-nilly at people who may or may not be "insurgents". I would imagine
you would need some good intel.

And, btw, to make it on topic for the vietnam group, I came across this
interesting CIA article re. a retrospective on counterinsurgency programs
and the controversial Phoenix Program (1969-70).

https://www.cia.gov/library/center-for-the-study-of-intelligence/csi-publications/csi-studies/studies/vol51no2/a-retrospective-on-counterinsurgency-opera...

- nilita


Jack Linthicum

9/21/2008 4:58:00 PM

0

On Sep 21, 12:54 pm, "La N" <nilita2004NOS...@yahoo.com> wrote:
> "Jason" <elcyberl...@gmail.com> wrote in message
>
> news:70c2f85b-7f4f-4a9d-a98f-8e92ab2f9666@v16g2000prc.googlegroups.com...
> Pretty much every book I have studied on counter-insurgencies suggest
> that more troops in the area decreases violence.  These troops need to
> be out doing things and not sitting on a firebase doing nothing.
>
> ***************************
>
> Hi, Jason, good to see you again!
>
> Anyway, what should these troops need "to be out doing"?  To keep this on
> topic for the naval group, wouldn't that be a specialized task, a la Navy
> SEALS or other special ops groups?  I mean, you can't just go out shooting
> willy-nilly at people who may or may not be "insurgents".  I would imagine
> you would need some good intel.
>
> And, btw, to make it on topic for the vietnam group, I came across this
> interesting CIA article re. a retrospective on counterinsurgency programs
> and the controversial Phoenix Program (1969-70).
>
> https://www.cia.gov/library/center-for-the-study-of-intelli......
>
> - nilita

Essentially, you take military people and turn them into police with a
beat. Just like the powers that be say is not the way to fight
terrorists.

William Black

9/21/2008 7:20:00 PM

0


"La N" <nilita2004NOSPAM@yahoo.com> wrote in message
news:T_uBk.1097$Pv5.436@edtnps83...

> Anyway, what should these troops need "to be out doing"? To keep this on
> topic for the naval group, wouldn't that be a specialized task, a la Navy
> SEALS or other special ops groups? I mean, you can't just go out shooting
> willy-nilly at people who may or may not be "insurgents". I would imagine
> you would need some good intel.

Goodness no.

Engineers are out building roads and bridges and schools and stringing
telephone wires.

Logistics people are out bringing relief supplies to remote places.

Medical types are bringing aid to the sick.

The infantry are out being careful not to wear steel helmets and sun glasses
and are very busy looking calm and relaxed and making friends and giving
sweets to kids.

Middle ranking officers are out making friends with local grandees and
seeing where those nice engineers and medical and logistics people should go
next.

Intelligence people are out doing, well, whatever it is that intelligence
people do.

The Special Forces people are out killing anyone who gets in the way of the
military being nice to people.

--
William Black


I've seen things you people wouldn't believe.
Barbeques on fire by the chalets past the castle headland
I watched the gift shops glitter in the darkness off the Newborough gate
All these moments will be lost in time, like icecream on the beach
Time for tea.



WaltBJ

9/21/2008 8:43:00 PM

0

Rupert Murdoch on fiscal policy? Put the fox in the hen house? Sheesh!
The only policy he ever followed was Mine! Mine! Mine!
Walt BJ

richardcasady

9/22/2008 8:42:00 PM

0

On Sun, 21 Sep 2008 20:19:58 +0100, "William Black"
<william.black@hotmail.co.uk> wrote:

>
>The infantry are out being careful not to wear steel helmets

Being careful to stay out of antique shops? The US Army has been using
kevlar helmets for decades.

Casady